Skip to content
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

`mixin` with `on` clause unable to resolve `runtimeType` #34564

Closed
yjbanov opened this issue Sep 24, 2018 · 1 comment

Comments

Projects
None yet
5 participants
@yjbanov
Copy link

commented Sep 24, 2018

What I was doing

Wrote this code:

class Foo {
}

mixin HappyMixin {
  String toString() => '$runtimeType';
}

mixin UnhappyMixin on Foo {
  String toString() => '$runtimeType';
//                       ^
//                       "Undefined name 'runtimeType'."
}

Versions

  • Flutter SDK 0.4.3-pre.1162
  • Visual Studio Code 1.27.1
  • Dart Code 2.18.0

@stereotype441 @JekCharlsonYu @leafpetersen

@stereotype441 stereotype441 added this to the Dart2.1 milestone Sep 24, 2018

@vsmenon vsmenon added the p1-high label Sep 24, 2018

@bwilkerson bwilkerson added the type-bug label Sep 24, 2018

@scheglov scheglov self-assigned this Sep 24, 2018

dart-bot pushed a commit that referenced this issue Sep 24, 2018

Look into superclassConstraints while searching for a member in inter…
…faces.

R=brianwilkerson@google.com, paulberry@google.com

Bug: #34564
Change-Id: I11642d89710a89fb347106ff374ff0ea4227310c
Reviewed-on: https://dart-review.googlesource.com/76284
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>

@scheglov scheglov closed this Sep 25, 2018

@yjbanov

This comment has been minimized.

Copy link
Author

commented Sep 25, 2018

Thank you for fixing this so quickly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.