Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Unified Diff: tests/language/mixin_override_regression_test.dart

Issue 12328035: Teach Selector.applies about mixins. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/language/mixin_override_regression_test.dart
diff --git a/tests/language/return_this_type_test.dart b/tests/language/mixin_override_regression_test.dart
similarity index 50%
copy from tests/language/return_this_type_test.dart
copy to tests/language/mixin_override_regression_test.dart
index b97e38252772ee7571886a9d7054240a4b8d2764..bbc9b8970df43e92836c2a4dc210774701d89bba 100644
--- a/tests/language/return_this_type_test.dart
+++ b/tests/language/mixin_override_regression_test.dart
@@ -2,15 +2,21 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// Make sure the engine does not infer the wrong type for [:A.foo:].
-
-class A {
- foo() => this;
+class C0 {
+ int m1() => 5;
+ int m2() => m1();
}
-class B extends A {
+typedef C1 = Object with C0;
+
+class D {
+ int m1() => 7;
}
+class E0 extends C0 with D {}
+class E1 extends C1 with D {}
+
main() {
- Expect.isTrue(new B().foo() is B);
+ Expect.equals(7, new E0().m2());
+ Expect.equals(7, new E1().m2());
}

Powered by Google App Engine
This is Rietveld 408576698