dotnet/roslyn

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

Open

#14.037 aperta il 23 set 2016

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

Metriche repository

Star
 (20.414 star)
Metriche merge PR
 (Merge medio 6g 17h) (256 PR mergiate in 30 g)

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