dotnet/roslyn

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

开放

#14,037 创建于 2016年9月23日

 (0 条评论) (1 个反应) (1 位负责人)C# (4,257 个派生)batch import
Area-CompilersBugConcept-Diagnostic ClarityFeature - Tupleshelp wanted

仓库指标

星标
 (20,414 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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

贡献者指南