OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 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 | 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 http://dartbug.com/23893/ | 5 // Regression test for http://dartbug.com/23893/ |
6 // | 6 // |
7 // Because annotations are parsed lazily, dart2js used to crash when an | 7 // Because annotations are parsed lazily, dart2js used to crash when an |
8 // annotation had a syntax error. | 8 // annotation had a syntax error. |
9 // This checks the same behavior as invalid_annotation_test.dart, except that we | 9 // This checks the same behavior as invalid_annotation_test.dart, except that we |
10 // use mirrors to trigger the error in the vm. This also triggers the error in | 10 // use mirrors to trigger the error in the vm. This also triggers the error in |
11 // dart2js differently. | 11 // dart2js differently. |
12 | 12 |
13 @MirrorsUsed(targets: const [A]) | 13 @MirrorsUsed(targets: const [A]) |
14 import 'dart:mirrors'; | 14 import 'dart:mirrors'; |
15 | 15 |
16 @Deprecated("m" | 16 @Deprecated("m" |
17 ,, // //# 01: compile-time error | 17 ,, // //# 01: compile-time error |
18 ) | 18 ) |
19 class A { | 19 class A {} |
20 } | |
21 | 20 |
22 main() { | 21 main() { |
23 reflectClass(A).metadata; | 22 reflectClass(A).metadata; |
24 } | 23 } |
OLD | NEW |