dotnet/roslyn

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

Aperta

#37.597 aperta il 30 lug 2019

 (0 commenti) (0 reazioni) (0 assegnatari)C# (4257 fork)batch import
Area-CompilersBugConcept-Diagnostic ClarityLanguage-C#help wanted

Metriche repository

Star
 (20.414 stelle)
Metriche merge PR
 (Merge medio 6g 17h) (256 PR mergiate in 30 g)

Descrizione

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.

Guida contributor