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 // Make sure the engine does not infer the wrong type for [:A.foo:]. |
6 | 6 |
7 import "package:expect/expect.dart"; | |
8 | |
9 class A { | 7 class A { |
10 foo() => this; | 8 foo() => this; |
11 } | 9 } |
12 | 10 |
13 class B extends A { | 11 class B extends A { |
14 } | 12 } |
15 | 13 |
16 main() { | 14 main() { |
17 Expect.isTrue(new B().foo() is B); | 15 Expect.isTrue(new B().foo() is B); |
18 } | 16 } |
OLD | NEW |