dotnet/roslyn

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

Open

#14.037 aberto em 23 de set. de 2016

Ver no GitHub
 (0 comments) (1 reaction) (1 assignee)C# (4.257 forks)batch import
Area-CompilersBugConcept-Diagnostic ClarityFeature - Tupleshelp wanted

Métricas do repositório

Stars
 (20.414 stars)
Métricas de merge de PR
 (Mesclagem média 6d 17h) (256 fundiu PRs em 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

Guia do colaborador