-
Notifications
You must be signed in to change notification settings - Fork 214
Pattern Matching not working on ternary operators #3174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is working as specified / intended. Case clauses are only supported in certain settings: |
I'll refile this on the language as a feature request. |
Interesting I didn't know. |
When we added patterns, we didn't add a We discussed generalizing that in the initial design, but we didn't have time to work through all of the consequences around precedence and variable scoping. There is a feature request to support using |
Thanks for the clarification @munificent . Congratulations for your work on that feature. Patter Matching is the thing I am loving most on dart nowadays :) |
This code compiles and works properly:
But this one doesn't compile:
It gives the following error:
Conditions must have a static type of 'bool'.
Dart version: 3.0.5
The text was updated successfully, but these errors were encountered: