You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the proposed changes for C# 9.0, a type expression such as A[] can in theory be used as a switch case.
caseA[]:
However, it is likely that this will parse as an expression. The binder should be flexible enough to take the parse tree (for the expression) and bind it as a type, and the pattern binder should be capable of backing off from the expression interpretation to the type interpretation.
Similarly
case(A[]):
This should have the same meaning as above, but currently parses as an erroneous cast expression.
The text was updated successfully, but these errors were encountered:
In the proposed changes for C# 9.0, a type expression such as
A[]
can in theory be used as a switch case.However, it is likely that this will parse as an expression. The binder should be flexible enough to take the parse tree (for the expression) and bind it as a type, and the pattern binder should be capable of backing off from the expression interpretation to the type interpretation.
Similarly
This should have the same meaning as above, but currently parses as an erroneous cast expression.
The text was updated successfully, but these errors were encountered: