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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // Make sure the engine does not infer the wrong type for [:A.foo:]. 5 class C0 {
6 6 int m1() => 5;
7 class A { 7 int m2() => m1();
8 foo() => this;
9 } 8 }
10 9
11 class B extends A { 10 typedef C1 = Object with C0;
11
12 class D {
13 int m1() => 7;
12 } 14 }
13 15
16 class E0 extends C0 with D {}
17 class E1 extends C1 with D {}
18
14 main() { 19 main() {
15 Expect.isTrue(new B().foo() is B); 20 Expect.equals(7, new E0().m2());
21 Expect.equals(7, new E1().m2());
16 } 22 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698