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

Unified Diff: sdk/lib/mirrors/mirrors.dart

Issue 278983004: Improve error messages in MirrorSystem.findLibrary. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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 | « runtime/lib/mirrors_patch.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/mirrors/mirrors.dart
diff --git a/sdk/lib/mirrors/mirrors.dart b/sdk/lib/mirrors/mirrors.dart
index 7fb810e9b87d3ff865768437e9ce35f6ba18f0f5..e3c968a1fec08979b3e35c273a29585feae009d1 100644
--- a/sdk/lib/mirrors/mirrors.dart
+++ b/sdk/lib/mirrors/mirrors.dart
@@ -79,10 +79,7 @@ abstract class MirrorSystem {
*
* If no unique library exists, an error is thrown.
*/
- LibraryMirror findLibrary(Symbol libraryName) {
- return libraries.values.singleWhere(
- (library) => library.simpleName == libraryName);
- }
+ LibraryMirror findLibrary(Symbol libraryName);
/**
* A mirror on the isolate associated with this [MirrorSystem].
« no previous file with comments | « runtime/lib/mirrors_patch.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698