dotnet/roslyn
Deconstruction: infer variable types even if the right-hand-side is not fully typed
Offen
#14.037 geöffnet am 23.09.2016
Area-CompilersBugConcept-Diagnostic ClarityFeature - Tupleshelp wanted
Repository-Metriken
- Stars
- (20.414 Sterne)
- PR-Merge-Metriken
- (PR-Metriken ausstehend)
Beschreibung
var (x, y) = (1, null);
The type inference fails both for x and y, but it should succeed for x.
See CodeGenDeconstructTests.UnassignedUsedInDeconstructionInScript and this discussion https://github.com/dotnet/roslyn/pull/13957/files#r80320718
FYI for @AlekseyTs