Skip to content

Issue for discussion of super mixin type argument inference #13

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

Closed
leafpetersen opened this issue Aug 14, 2018 · 5 comments
Closed

Issue for discussion of super mixin type argument inference #13

leafpetersen opened this issue Aug 14, 2018 · 5 comments

Comments

@leafpetersen
Copy link
Member

I've updated the Dart 2.0 super mixin type inference specification to use the syntax from this proposal here. This issue is for any relevant discussion, comments, or feedback.

cc @lrhn @eernstg @munificent

@leafpetersen
Copy link
Member Author

No new discusssion (unsurprising) I'll go ahead and close this out.

@yjbanov
Copy link

yjbanov commented Sep 5, 2018

Somehow I missed this issue. There's one instance where Flutter has to ignore the MIXIN_INFERENCE_INCONSISTENT_MATCHING_CLASSES check. However, from what I can tell, the new proposal fixes the issue.

@leafpetersen
Copy link
Member Author

Hmm, why does the proposal address this - it's just porting over what's already implemented for class based super-mixins? Can you point me at what the inconsistent matching classes are?

@yjbanov
Copy link

yjbanov commented Sep 5, 2018

https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/widgets/dismissible.dart#L190

The reason I believe that the proposal addresses the issue is in the first example given in the Inference proceeds outwards section, which seems to match Flutter's usage if you substitute _DismissibleState for A, State<Dismissible> for M0<int>, and AutomaticKeepAliveClientMixin for M1. The example states that "M1 is inferred as M1<int>", which for Flutter should translate to "AutomaticKeepAliveClientMixin is inferred as AutomaticKeepAliveClientMixin<Dismissible>".

I did overlook the fact that Flutter's case contains not one but two mixins, which may be where things break down.

@leafpetersen
Copy link
Member Author

You're right. It's a bug that this isn't working already.

dart-lang/sdk#34404

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants