| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 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. |
| 4 |
| 5 // Regression test for dart2js, issue 15720. |
| 6 |
| 7 class B {} |
| 8 |
| 9 confuse(x) { |
| 10 if (new DateTime.now() == 42) return confuse(x); |
| 11 return x; |
| 12 } |
| 13 |
| 14 main() { |
| 15 Set<B> set = new Set<B>.from([]); |
| 16 |
| 17 confuse(499); |
| 18 confuse(set); |
| 19 |
| 20 // Dart2js used to reuse a variable name, overwriting the `set` variable with |
| 21 // one of the B's. |
| 22 var t1 = new B(); |
| 23 var t2 = new B(); |
| 24 var t3 = new B(); |
| 25 var t4 = new B(); |
| 26 |
| 27 set.addAll([t1, t2, t3, t4]); |
| 28 confuse(7); |
| 29 |
| 30 set.addAll([t1, t2, t3, t4]); |
| 31 } |
| OLD | NEW |