-
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
Dartanalyzer reports error message for sync* and async* functions in a strong mode #27468
Comments
There are two parts to this bug: the error message that isn't "correct", and the question if we should even allow it. |
this was an intentional strong mode bug fix. Your return type of TestStream will always fail. Offhand I don't remember the bug but I might be able to dig it up. |
This was #25854. |
The message is wrong, though. The given return type is assignable to Iterable. |
sure, we can tweak the wording. The return type must be |
It can also be |
Spec is now changed to "must be a supertype of That also allows If it is, e.g., |
this error message could still be improved. |
This error is still present. |
In a strong mode analyzer reports that "Functions marked 'sync*' must have a return type assignable to 'Iterable'". But TestItearble from above has type assignable to Iterable. Seems that there should be no error message at all.
The same issue exists for async* functions
The text was updated successfully, but these errors were encountered: