dotnet/roslyn

Improve error message reported when attempting to declare `ref` field in a `ref struct`

Open

#37,597 opened on Jul 30, 2019

View on GitHub
 (0 comments) (0 reactions) (0 assignees)C# (20,414 stars) (4,257 forks)batch import
Area-CompilersBugConcept-Diagnostic ClarityLanguage-C#help wanted

Description

image

Current error message:

image

Seems like the code is parsed as method declaration. It would be better to parse as field declaration and report error on ref keyword.

Contributor guide