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 // Regression test for dart2js that used to generate wrong code for | 5 // Regression test for dart2js that used to generate wrong code for |
6 // it. The bug happened in the SSA type propagation. | 6 // it. The bug happened in the SSA type propagation. |
7 | 7 |
8 class A { | 8 class A { |
9 next() => new B(); | 9 next() => new B(); |
10 doIt() => null; | 10 doIt() => null; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 var b = a; | 48 var b = a; |
49 while (b.isEmpty) { | 49 while (b.isEmpty) { |
50 // (4, 6) | 50 // (4, 6) |
51 b.foo(); // (3, 7) | 51 b.foo(); // (3, 7) |
52 b.bar(); // (8) | 52 b.bar(); // (8) |
53 b = b.doIt(); // (2) | 53 b = b.doIt(); // (2) |
54 } | 54 } |
55 | 55 |
56 if (!entered) throw 'Test failed'; | 56 if (!entered) throw 'Test failed'; |
57 } | 57 } |
OLD | NEW |