Index: test/codegen/lib/mirrors/regress_16321_test.dart |
diff --git a/test/codegen/lib/mirrors/regress_16321_test.dart b/test/codegen/lib/mirrors/regress_16321_test.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c717b7910638baaaa457363bf62a8301ed977f9d |
--- /dev/null |
+++ b/test/codegen/lib/mirrors/regress_16321_test.dart |
@@ -0,0 +1,21 @@ |
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+// Regression test for Issue 16321. |
+// (Type errors in metadata crashed the VM in checked mode). |
+ |
+import "dart:mirrors"; |
+ |
+class TypedBox { |
+ final List<String> contents; |
+ const TypedBox(this.contents); |
+} |
+ |
+@TypedBox('foo') /// 01: static type warning, checked mode compile-time error |
+@TypedBox(const ['foo']) |
+class C {} |
+ |
+main() { |
+ reflectClass(C).metadata; |
+} |