Skip to content

bug with parsing an anonymous function in LTS v1.6 #51946

@nsajko

Description

@nsajko
julia> function f(::Val{n}) where {n}
         n
       end
f (generic function with 1 method)

julia> function(::Val{n}) where {n}
         n
       end
ERROR: syntax: expected "(" in function definition
Stacktrace:
 [1] top-level scope
   @ none:1

julia> versioninfo()
Julia Version 1.6.7
Commit 3b76b25b64 (2022-07-19 15:11 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: AMD Ryzen 3 5300U with Radeon Graphics
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, znver2)
Environment:
  JULIA_NUM_PRECOMPILE_TASKS = 3
  JULIA_PKG_PRECOMPILE_AUTO = 0

Works fine on v1.9, v1.10, v1.11.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backport 1.6Change should be backported to release-1.6

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions