| OLD | NEW |
| 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 } |
| OLD | NEW |