dotnet/roslyn

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

Open

#22 058 ouverte le 11 sept. 2017

Voir sur GitHub
 (0 commentaires) (0 réactions) (0 assignés)C# (4 257 forks)batch import
Area-CompilersBugConcept-Diagnostic ClarityFeature - Readonly ReferencesLanguage-C#help wanted

Métriques du dépôt

Stars
 (20 414 stars)
Métriques de merge PR
 (Merge moyen 6j 17h) (256 PRs mergées en 30 j)

Description

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"

Guide contributeur