Skip to content

Fix-its for misplaced typed throws could be improved #2391

Closed
@DougGregor

Description

@DougGregor

Issue Kind

Bad Diagnostic Produced

Source Code

func foo() -> throws(MyError) Int {}

Description

Applying the Fix-It for the parser diagnostics here produces malformed code, because the thrown error type gets lost. The "fixed" code is:

func foo() throws -> (MyError) Int {}

It should be

func foo() throws(MyError) -> Int {}

Metadata

Metadata

Assignees

Labels

SwiftParserBugs in the (new) Parser written in SwiftbugSomething isn't workinggood first issueGood for newcomers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions