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 library hi_test; | 5 // Regression test for issue 12118 which caused a crash in dart2js. |
6 | 6 |
7 import '../../../hi/hi.dart' as hi; | 7 const X = 42; |
8 | 8 |
9 // @static-clean | 9 class A { |
10 | 10 final x; |
11 /** | 11 A({this.x: X}); |
12 * This test exists to ensure that the hi sample compiles without errors. | |
13 */ | |
14 void main() { | |
15 | |
16 } | 12 } |
17 | 13 |
| 14 class B extends A {} |
| 15 |
| 16 void main() { |
| 17 if (new B().x != 42) { |
| 18 throw 'Test failed'; |
| 19 } |
| 20 } |
OLD | NEW |