-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Analyzer issue with complex generic functions #33159
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
Cut down example: typedef _CheckedConvert = S Function<S>(String key, _CastFunction<S>);
typedef _CastFunction<R> = R Function(Object);
int Function(_CheckedConvert converter) f = (check) => 3; |
I'm able to reproduce this bug. Having a look now. |
Thanks!
…On Mon, May 21, 2018 at 10:56 AM Paul Berry ***@***.***> wrote:
I'm able to reproduce this bug. Having a look now.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#33159 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABCih3aor4HjQRdjp9AhMOnnKJI4UVRks5t0v_YgaJpZM4UDjHY>
.
|
This has been an extremely tricky bug, due to two design assumptions of the analyzer that no longer hold true in Dart 2.0:
In Leaf's cut down example, the way the problem manifests is that type inference infers a type of
It would be nice to rewrite |
Fix is now ready for review |
Woot! Great to see this bug well fixed. The old Dart 1 function type representation has been plaguing us. I'm betting there are a number of other open issues I've filed over the past year or two that have been closed by this as well. |
Expected: all good. Runs fine, even w/
--preview-dart-2
Actual:
CC @leafpetersen – I'll let you clean-up the labels
The text was updated successfully, but these errors were encountered: