Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Unified Diff: tests/lib/mirrors/regress_16321_test.dart

Issue 148263007: VM: Fix crash when a type error is encountered while evaluating metadata in checked mode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/lib/lib.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/mirrors/regress_16321_test.dart
diff --git a/tests/lib/mirrors/regress_16321_test.dart b/tests/lib/mirrors/regress_16321_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..716e1aa8aa733c1a74e021cbd9456a96f80d1691
--- /dev/null
+++ b/tests/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
rmacnak 2014/01/27 23:07:47 Or is the analyzer supposed to report this as an e
+@TypedBox(const ['foo'])
+class C {}
+
+main() {
+ reflectClass(C).metadata;
+}
« no previous file with comments | « tests/lib/lib.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698