dotnet/roslyn

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

オープン

#14,037 opened on 2016/09/23

 (0 件のコメント) (1 件のリアクション) (1 人の担当者)C# (4,257 件のフォーク)batch import
Area-CompilersBugConcept-Diagnostic ClarityFeature - Tupleshelp wanted

Repository metrics

Stars
 (20,414 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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

コントリビューターガイド