| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2015, 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 // Error in class finalization triggered via mirror in a static initializer. | |
| 6 // Simply check that we do not crash. | |
| 7 | |
| 8 library mirror_in_static_init_test; | |
| 9 | |
| 10 import 'dart:mirrors'; | |
| 11 | |
| 12 abstract class C { | |
| 13 int _a; | |
| 14 C([this._a: 0]); | |
| 15 } | |
| 16 | |
| 17 final int staticField = () { | |
| 18 var lib = currentMirrorSystem().findLibrary(#mirror_in_static_init_test); | |
| 19 var lst = List.from(lib.declarations.values); | |
| 20 return 42; | |
| 21 }(); | |
| 22 | |
| 23 main() { | |
| 24 return staticField; | |
| 25 } | |
| OLD | NEW |