Skip to content

parse error from type T{} in anonymous function #41253

@stevengj

Description

@stevengj

This seems inconsistent (from discourse):

julia> function foo(::Dict{}); end
foo (generic function with 1 method)

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

julia> function(::Dict); end
#5 (generic function with 1 method)

julia> (::Dict{}) -> nothing
#9 (generic function with 1 method)

Metadata

Metadata

Assignees

Labels

bugIndicates an unexpected problem or unintended behaviorparserLanguage parsing and surface syntax

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions