dotnet/roslyn

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

Aberta

#37.597 aberto em 30 de jul. de 2019

 (0 comentário) (0 reação) (0 responsável)C# (4.257 forks)batch import
Area-CompilersBugConcept-Diagnostic ClarityLanguage-C#help wanted

Métricas do repositório

Stars
 (20.414 estrelas)
Métricas de merge de PR
 (Mesclagem média 6d 17h) (256 fundiu PRs em 30d)

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.

Guia do colaborador