-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Front end infers dynamic for ".then" invocations #33044
Comments
I suspect that all of the For the remainder: For the rest, |
#32843 is the issue for void inference. |
@leafpetersen in that case I would have expected the front end to infer a type of |
sorry, I didn't read closely enough. I can't reproduce this though: the code below, run with dart --preview-dart-2 from fairly recent bleeding edge, has the expected errors (I think it stops reporting errors after some limit, but if you delete the first 5, you get the next 5 as expected). Am I still missing something?
|
@leafpetersen Oops, you are right. I forgot to include When I include the correct import, I get the same results as you. Since the remaining problems are already covered by open bugs, I'm closing this bug. |
Consider the following code:
The analyzer infers
t5
,t6
,t11
, andt12
to have typeFuture<String>
, and the others to have typeFuture<Null>
. The front end infers the type oft1
throught12
to bedynamic
.This has user-visible consequences. For example, the analyzer considers this to be an error, and the front end doesn't:
I believe the analyzer behavior is correct. @leafpetersen can you confirm?
The text was updated successfully, but these errors were encountered: