Skip to content

Language Parser: poor error recovery on faulty DU declaration / improve error reporting #11468

Description

@smoothdeveloper
// lots of code

type MyBrokenDU =
| A B // error FS0010: Unexpected identifier in member definition

// lots of code

I miss to put "of" between A and B, the whole file is failing to provide tooling support.

I'd expect if another declaration (a type, a binding) is encountered, it could determine the broken DU is closed.

I'd expect the error message to guide me in either:

  • you are missing of before case member definition
  • you are missing | before next case definition

related: #1103

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions