-
Notifications
You must be signed in to change notification settings - Fork 1.7k
CFE produces compile time error on language/async_star/await_pauses_test.dart #41559
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
Comments
The CFE is wrong. |
Taking a further look this is actually related to the unspecified/underspecified/incoherent inference of We currently have the special-casing that @eernstg @lrhn: We discussed this case a while ago but I don't think we ever got a conclusion. @leafpetersen: Should we adjust the inference to support the special-casing of the typing of |
Not sure the "similar for double" is in the specification. The rule is just that We may need to also add that if The rule for context typing would be:
We can't provide a context type for If we add more rules, as suggested above, we can also make more deductions:
|
Do we have any progress on this? Should we have a language issue for the inference of |
No progress. The language issue is probably dart-lang/language#725. |
@johnniwinther I will look into this. I need to wrap up the initialization assignment proposal and related tests first, but I should be able to get to this this week. |
@johnniwinther @stereotype441
The analyzer has no issue with the test language/async_star/await_pauses_test.dart but the CFE reports the error:
Inspecting the test it looks like all the types here should be inferred as ints but somehow the CFE believes the Future being created is of type
Future<num>
.A simple fix for the test is to explicitly type the Future:
but I thought I should report something here since the tools disagree. Which one is correct?
cc @liamappelbe @alexmarkov
The text was updated successfully, but these errors were encountered: