dotnet/roslyn

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

開放

#22,058 建立於 2017年9月11日

 (0 則留言) (0 個反應) (0 位負責人)C# (4,257 個分叉)batch import
Area-CompilersBugConcept-Diagnostic ClarityFeature - Readonly ReferencesLanguage-C#help wanted

倉庫指標

星標
 (20,414 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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"

貢獻者指南