dotnet/roslyn

Support Dynamic Deconstruction

Aperta

#32.709 aperta il 23 gen 2019

 (5 commenti) (0 reazioni) (0 assegnatari)C# (4257 fork)batch import
Area-CompilersFeature - TuplesFeature Requesthelp wanted

Metriche repository

Star
 (20.414 stelle)
Metriche merge PR
 (Merge medio 6g 17h) (256 PR mergiate in 30 g)

Descrizione

I expect the following to compile:

dynamic data = new { foo = 42 };
var ( foo ) = data;

But instead I get the error:

image

The type of foo can be inferred. It's dynamic!

Guida contributor