Optional commas in tuple deconstruction?

Rider is allowing me to type this with no errors, even though it will not build:

var (a b c) = (1, 2, 3);

Either Rider is wrong, and that does require commas, or else it could be related to C# language version. (Though I have not heard of this feature, it might make sense since the variable names are not expressions, so a lack of commas might not be ambiguous.)

If it is related to C# language version, how do I tell what version I am using, and why is the build operation using a different version than the code window?

My projects are all set to this:

<LangVersion>latest</LangVersion>

 

0
1 comment

Hi Dave Cousineau

Thank you for the report. I reproduced the issue and created a bug for it: https://youtrack.jetbrains.com/issue/RSRP-487464 

Feel free to follow it for updates. 

Should you have any other questions, let us know. Have a nice day! 

0

Please sign in to leave a comment.