-
Notifications
You must be signed in to change notification settings - Fork 30
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
enable strict-casts
#125
Comments
strict-casts
in core or recommendedstrict-casts
in core or recommended
The "strict-casts" flag is not a lint, just an analyzer flag (https://dart.dev/guides/language/analysis-options#enabling-additional-type-checks). It makes it an error to have an implicit downcast from I don't think it's something we should enabled by default in the recommended lints, not unless we would also be willing to work towards removing it from the language entirely. I don't think we're there today. |
We need more investigation to take action here, and will likely evaluate |
strict-casts
in core or recommendedstrict-casts
From a discussion with @leafpetersen, he thought this was likely worth adding, if we can handle the special case for common patterns in web code. |
If we change the language to give another easy way to get a general downcast, or an explicit dynamic section of code where the mode won't apply, or specify specific workaround patterns, then it's OK to discourage uses that don't use those patterns. We have not done that yet. |
Helps in catching unintended runtime errors related to dynamic.
See also #44, which is the other part of this puzzle.
The text was updated successfully, but these errors were encountered: