-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Deprecate avoid_as? #57894
Comments
Interesting. I totally missed this discussion. Thanks! |
For dart2js it still is uneven: we haven't invested in optimizing away checks because many customers use At this time, the |
My casts look like: // Iterator<num> iterator;
// In case when values are guarantied to be ints:
while (hasNext) {
final int value = iterator.current; Before Dart SDK 2.1.1, analyzer's
With the latest SDK version, I have to either enable |
Can this lint rule now be deprecated or does it still apply in dart2js? Using this rule for a Flutter app which runs also in web. Might be completely unrelated, but |
For dart2js there is still a benefit when using |
I got a question about this lint on Twitter in context of Flutter - we should definitely either deprecate it or at least make it explicit why it is there and which platforms it applies to. People are confused because this lint is enforced in Flutter and it sends a confusing message that implicit casting is somehow cheaper than Recommendation to use /cc @Hixie |
Yeah this is obsolete, we should just remove it, at least as a default if it's still enabled anywhere. |
+1 for deprecating and I'll take that on. (FWIW I don't see it enabled anywhere in flutter but it definitely used to be so the confusion could be lingering or the user is on an old branch.) |
As of #34097 (comment)
Not sure how dart2js handles explicit as checks. Is there an extra penalty ? Perhaps @sigmundch knows.
The text was updated successfully, but these errors were encountered: