Skip to content

Underscore not allowed with optional parameters #32727

@cstjean

Description

@cstjean
julia> f(_, a) = 10
f (generic function with 1 method)

julia> f(_, a=1) = 10
ERROR: syntax: all-underscore identifier used as rvalue around REPL[0]:1

The second form seems legitimate, no? The same issue arises with keyword arguments (f(_; x=1) = ...)

Metadata

Metadata

Assignees

Labels

bugIndicates an unexpected problem or unintended behaviorcompiler:loweringSyntax lowering (compiler front end, 2nd stage)help wantedIndicates that a maintainer wants help on an issue or pull request

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions