dotnet/roslyn

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

Open

#14,037 opened on Sep 23, 2016

View on GitHub
 (0 comments) (1 reaction) (1 assignee)C# (4,257 forks)batch import
Area-CompilersBugConcept-Diagnostic ClarityFeature - Tupleshelp wanted

Repository metrics

Stars
 (20,414 stars)
PR merge metrics
 (Avg merge 6d 17h) (256 merged PRs in 30d)

Description

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

Contributor guide