dotnet / dotnet/fsharp

[Parser recovery] DU type without `=` sign

Open
#16,367 0 comments 0 reactions 1 assignee Claimed by @edgarfgp View on GitHub
Area-Compiler-Syntax Feature Improvement
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 22h
Merged PRs (30d)
144

Description

I'm wondering if this is tracked and if not, if this would be possible to recover from:

```fsharp
type TrackIndexOrHardwareTrackIndex
| HardwareTrack of int
| VirtualTrack of TrackIndex
```

![image](https://github.com/dotnet/fsharp/assets/87944/97afa68d-839f-48f9-af6b-052e15513a19)

VS 2022 has a code fixer for this, but maybe it is possible to recover and not break parsing and tooling for remaining of the document?

Related: #11481

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.