Index: test/codegen/lib/mirrors/deferred_mirrors_metatarget_lib.dart |
diff --git a/test/codegen/lib/mirrors/deferred_mirrors_metatarget_lib.dart b/test/codegen/lib/mirrors/deferred_mirrors_metatarget_lib.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..423ded865f35743d51fd519ff45473a38b4857d5 |
--- /dev/null |
+++ b/test/codegen/lib/mirrors/deferred_mirrors_metatarget_lib.dart |
@@ -0,0 +1,22 @@ |
+// 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. |
+ |
+library lib; |
+ |
+@MirrorsUsed(metaTargets: "MetaTarget") |
+import "dart:mirrors"; |
+ |
+class MetaTarget { |
+ const MetaTarget(); |
+} |
+ |
+@MetaTarget() |
+class A { |
+ String toString() => "A"; |
+} |
+ |
+String foo() { |
+ ClassMirror a = currentMirrorSystem().findLibrary(#lib).declarations[#A]; |
+ return a.newInstance(const Symbol(""), []).invoke(#toString, []).reflectee; |
+} |