-
Notifications
You must be signed in to change notification settings - Fork 446
Closed
Labels
SwiftParserBugs in the (new) Parser written in SwiftBugs in the (new) Parser written in SwiftbugSomething isn't workingSomething isn't working
Description
Issue Kind
Bad Diagnostic Produced
Source Code
test { ([X]) in }
Description
New parser:
error: unexpected code '[X]' in parameter clause
test { ([X]) in }
^~~
Old parser:
warning: unnamed parameters must be written with the empty name '_' [parameter_unnamed_warn]
test { ([X]) in }
^
_:
This is a special case. More generally, the old parser is capable of diagnosing this kind of closure parameter production gracefully when all of the following are true:
- An argument name cannot be parsed (link)
- A type can be parsed per
Parser::canParseType()
, and said type is followed by,
,)
, or=
(link)
Related to #2331.
Metadata
Metadata
Assignees
Labels
SwiftParserBugs in the (new) Parser written in SwiftBugs in the (new) Parser written in SwiftbugSomething isn't workingSomething isn't working