Skip to content

Missing parentheses in closure signature produces bad diagnostic #1925

Closed
@bnbarham

Description

@bnbarham

Issue Kind

Bad Diagnostic Produced

Source Code

_ = { a: Int, b: Int in
}

Description

The diagnostic produced here is:

error: unexpected code ': Int, b: Int in' in closure

But it would be nice to instead have an error about missing parentheses (and a fix-it to add them). Apparently we're also not recovering to the in here properly, which isn't great.

rdar://112407661

Metadata

Metadata

Assignees

Labels

SwiftParserBugs in the (new) Parser written in SwiftbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions