dotnet/roslyn

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

Open

#37,597 创建于 2019年7月30日

在 GitHub 查看
 (0 评论) (0 反应) (0 负责人)C# (20,414 star) (4,257 fork)batch import
Area-CompilersBugConcept-Diagnostic ClarityLanguage-C#help wanted

描述

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.

贡献者指南

Improve error message reported when attempting to declare `ref` field in a `ref struct` · dotnet/roslyn#37597 | Good First Issue