dotnet/roslyn
在 GitHub 查看Deconstruction: infer variable types even if the right-hand-side is not fully typed
Open
#14,037 创建于 2016年9月23日
Area-CompilersBugConcept-Diagnostic ClarityFeature - Tupleshelp wanted
仓库指标
- Star
- (20,414 star)
- PR 合并指标
- (平均合并 6天 17小时) (30 天内合并 256 个 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