Index: sdk/lib/_internal/compiler/implementation/mirrors_used.dart |
diff --git a/sdk/lib/_internal/compiler/implementation/mirrors_used.dart b/sdk/lib/_internal/compiler/implementation/mirrors_used.dart |
index 9c8df9cab5fbe0355c21246f47bedc7b714f2344..144f3950d2abbe5d4f3dff27f6c412c95e5639a5 100644 |
--- a/sdk/lib/_internal/compiler/implementation/mirrors_used.dart |
+++ b/sdk/lib/_internal/compiler/implementation/mirrors_used.dart |
@@ -120,8 +120,11 @@ class MirrorUsageAnalyzerTask extends CompilerTask { |
/// the resolver to suppress hints about using new Symbol or |
/// MirrorSystem.getName. |
bool hasMirrorUsage(Element element) { |
- return librariesWithUsage != null |
- && librariesWithUsage.contains(element.getLibrary()); |
+ LibraryElement library = element.getLibrary(); |
+ // Internal libraries always have implicit mirror usage. |
+ return library.isInternalLibrary |
+ || (librariesWithUsage != null |
+ && librariesWithUsage.contains(library)); |
} |
/// Call-back from the resolver to analyze MirorsUsed annotations. The result |