-
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
false positives of cascade_invocations when there are implicit downcast assignments #57626
Comments
an other workaround |
Yes, that works. Although we have |
Is there still a good reason for update: #34582 |
The case is not compilable, for line
|
The original example was written prior to null safety. After null safely there would need to be either an explicit cast or a type test. I suspect that we can close this issue. |
I agree. I'm guessing there's a host of issues like this. |
Here's an example snippet.
In this case, we can't simply change this to
Bar bar = foo..bar();
becausefoo
is not of typeBar
until it is assigned tobar
variable using implicit downcast. The only reasonable way I found to get around this issue is to suppress the warning with an// ignore: cascade_invocations
comment, but maybe I missed something.The text was updated successfully, but these errors were encountered: