dotnet/roslyn

need a better error message for invalid lambda capturing of ref-like types

Open

#22,058 创建于 2017年9月11日

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

描述

See the use of ERR_AnonDelegateCantUseLocal

We are reusing the same errors for ref variables and for ref-like values. In the second case it could be confusing, although coming up with a better error is not easy. It should not at least say "ref" - that is not a problem here, probably "ref-like types"

贡献者指南

need a better error message for invalid lambda capturing of ref-like types · dotnet/roslyn#22058 | Good First Issue