| OLD | NEW |
| (Empty) |
| 1 library lib; | |
| 2 | |
| 3 import "deferred_mirrors_metadata_test.dart"; | |
| 4 @MirrorsUsed( | |
| 5 targets: const ["main", "main.A", "main.B", "main.C", "main.D", "lib.E"]) | |
| 6 import "dart:mirrors"; | |
| 7 | |
| 8 class H { | |
| 9 const H(); | |
| 10 } | |
| 11 | |
| 12 class F { | |
| 13 @H() | |
| 14 final int f; | |
| 15 } | |
| 16 | |
| 17 @C() | |
| 18 class E { | |
| 19 @D() | |
| 20 var f; | |
| 21 } | |
| 22 | |
| 23 String foo() { | |
| 24 String c = reflectClass(E).metadata[0].invoke(#toString, []).reflectee; | |
| 25 String d = reflectClass(E) | |
| 26 .declarations[#f] | |
| 27 .metadata[0] | |
| 28 .invoke(#toString, []).reflectee; | |
| 29 InstanceMirror i = currentMirrorSystem().findLibrary(#main).metadata[0]; | |
| 30 String a = i.invoke(#toString, []).reflectee; | |
| 31 String b = i.getField(#b).invoke(#toString, []).reflectee; | |
| 32 return a + b + c + d; | |
| 33 } | |
| OLD | NEW |