dotnet/roslyn
GitHub で見るDeconstruction: infer variable types even if the right-hand-side is not fully typed
Open
#14,037 opened on 2016年9月23日
Area-CompilersBugConcept-Diagnostic ClarityFeature - Tupleshelp wanted
Repository metrics
- Stars
- (20,414 stars)
- PR merge metrics
- (平均マージ 6d 17h) (30d で 256 merged PRs)
説明
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