Better diagnostics wanted for use of nullable type in switch pattern #16708
Labels
Area-Compilers
Bug
Concept-Diagnostic Clarity
The issues deals with the ease of understanding of errors and warnings.
Projects
Milestone
We currently produce suboptimal parse errors for an attempt to use a nullable type in a switch pattern. We interpret it as a
?:
expression, producing syntax errors, rather than letting the user know that a nullable type may not be used in a type pattern. For example:The text was updated successfully, but these errors were encountered: