dotnet/roslyn

Deconstruction: infer variable types even if the right-hand-side is not fully typed

Aperta

#14.037 aperta il 23 set 2016

 (0 commenti) (1 reazione) (1 assegnatario)C# (4257 fork)batch import
Area-CompilersBugConcept-Diagnostic ClarityFeature - Tupleshelp wanted

Metriche repository

Star
 (20.414 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

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

Guida contributor