-
-
Notifications
You must be signed in to change notification settings - Fork 943
Closed
Labels
Description
Feature request
When using the const-as-enum pattern (supported in 0.12.20 via #2904), it would be really helpful to improve several warnings. Turning on strict rules does handle explicitly invalid cases (IMO that should be in the default rules, but that's a different conversation), but defaults get a bit weird:
- Exhausting all switch cases should arguably mark the default case as unreachable
- If all cases have been covered, the lack of a default should not result in a "method xyz should return type but return statement is missing" error
- It would be helpful if the error for case-mismatch was on the
caseline rather thanswitch
Reactions are currently unavailable