OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 // A regression test for a dart2js crash. | 5 // A regression test for a dart2js crash. |
6 | 6 |
7 void main() { | 7 void main() { |
8 // This constructor call causes a crash in dart2js. | 8 // This constructor call causes a crash in dart2js. |
9 var o = new LinkedHashMap<int, int>(); | 9 var o = new LinkedHashMap<int, int>(); |
10 | 10 |
11 // Comment out this line, the compiler doesn't crash. | 11 // Comment out this line, the compiler doesn't crash. |
12 Expect.isFalse(o is List<int>); | 12 Expect.isFalse(o is List<int>); |
13 | 13 |
14 // Enable these two lines, the compiler doesn't crash. | 14 // Enable these two lines, the compiler doesn't crash. |
15 // Expect.isTrue(o.keys is List<int>); | 15 // Expect.isTrue(o.keys is Iterable<int>); |
16 // Expect.isFalse(o.keys is List<String>); | 16 // Expect.isFalse(o.keys is Iterable<String>); |
17 } | 17 } |
OLD | NEW |