Index: sdk/lib/mirrors/mirrors.dart |
diff --git a/sdk/lib/mirrors/mirrors.dart b/sdk/lib/mirrors/mirrors.dart |
index e3c968a1fec08979b3e35c273a29585feae009d1..7fb810e9b87d3ff865768437e9ce35f6ba18f0f5 100644 |
--- a/sdk/lib/mirrors/mirrors.dart |
+++ b/sdk/lib/mirrors/mirrors.dart |
@@ -79,7 +79,10 @@ abstract class MirrorSystem { |
* |
* If no unique library exists, an error is thrown. |
*/ |
- LibraryMirror findLibrary(Symbol libraryName); |
+ LibraryMirror findLibrary(Symbol libraryName) { |
+ return libraries.values.singleWhere( |
+ (library) => library.simpleName == libraryName); |
+ } |
/** |
* A mirror on the isolate associated with this [MirrorSystem]. |