Open tamasvajk opened 1 year ago
It seems the equivalent in Roslyn is ParenthesizedVariableDesignation
to indicate that there are multiple parts being assigned (with two SingleVariableDesignation
inside it in this example) rather than tuple_pattern
with two identifiers
.
https://github.com/dotnet/roslyn/blob/main/docs/features/deconstruction.md has more details
(a, var b) = (1, 2);
parses asThis looks correct. But
var (a, b) = (1, 2);
parses asThere should be no "pattern" in this tree. Roslyn parses
var (a, b)
as a declaration expression, and the=
is an assignment and not a variable declarator. Finallytuple_pattern
doesn't exist in Roslyn, so maybe the best would be to remove it altogether.