| 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 // Regression test for VM's IfConverted pass not keeping graph structure and |
| 6 | 6 // use lists in sync. |
| 7 import "package:expect/expect.dart"; | |
| 8 | 7 |
| 9 class A { | 8 class A { |
| 10 foo() => this; | 9 int x; |
| 11 } | 10 } |
| 12 | 11 |
| 13 class B extends A { | 12 f() { |
| 13 var a = new A(); |
| 14 a.x = (true ? 2 : 4); |
| 15 return a.x; |
| 14 } | 16 } |
| 15 | 17 |
| 16 main() { | 18 main() { |
| 17 Expect.isTrue(new B().foo() is B); | 19 for (var i = 0; i < 10000; i++) f(); |
| 18 } | 20 } |
| 21 |
| OLD | NEW |