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

貢獻者指南