Skip to content

Bad diagnostics for bogus effects specifier before arrow or brace in function  #1262

Closed
@ahoppen

Description

@ahoppen

Issue Kind

Bad Diagnostic Produced

Source Code

func foo() bogus -> Int {}
() bogus reasync -> Int

Description

Instead of using at to check for the -> or {, we should check whether we can recover to it on the same line, possibly reducing the recovery precedence when parsing function types because they could be followed by an identifier.

Metadata

Metadata

Assignees

No one assigned

    Labels

    SwiftParserBugs in the (new) Parser written in SwiftenhancementNew feature or requestgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions