Proposal: Support for static readonly fields as case patterns in switch statements/expressions #9364
Unanswered
pikoscielniak
asked this question in
Language Ideas
Replies: 1 comment
-
Static readonly is not anything special at the view of high level language. See #4321 and #6947. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to propose, or inquire about the official support for, using static readonly fields of a class or record directly as patterns in switch statements and switch expressions.
I would like to propose that this construct be considered valid language syntax and compilable, but under the current rules, it is not allowed:
I was wondering if there are any plans to support something like this in the future?
Beta Was this translation helpful? Give feedback.
All reactions