Open tamasvajk opened 1 year ago
There's no parse error for
void M()
{
var a = expr switch
{
R(E.A) => 1
};
}
So the above might be related to is [pattern]
.
At the same time, the sample added to this comment produces incorrect AST for the pattern:
(switch_expression_arm [4, 8] - [4, 19]
(constant_pattern [4, 8] - [4, 14]
(invocation_expression [4, 8] - [4, 14]
function: (identifier [4, 8] - [4, 9])
arguments: (argument_list [4, 9] - [4, 14]
(argument [4, 10] - [4, 13]
(member_access_expression [4, 10] - [4, 13]
expression: (identifier [4, 10] - [4, 11])
name: (identifier [4, 12] - [4, 13]))))))
The pattern should be a recursive pattern and not a constant one.
Are there any updates on this?
The below code reports parsing errors in the recursive patterns
R(E.A)
,R(E.A or E.B)
,(E.A)
:This is a recurring coding pattern in Roslyn.