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

Unified Diff: sdk/lib/_internal/compiler/implementation/mirrors_used.dart

Issue 23045004: Throw when reflecting on elements not covered by a `MirrorsUsed` annotation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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
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..e85b4e7d243258e7c9a07b6e58ded1cd223c2004 100644
--- a/sdk/lib/_internal/compiler/implementation/mirrors_used.dart
+++ b/sdk/lib/_internal/compiler/implementation/mirrors_used.dart
@@ -559,6 +559,10 @@ class MirrorUsageBuilder {
Element findLocalMemberIn(Element element, SourceString name) {
if (element is ScopeContainerElement) {
ScopeContainerElement scope = element;
+ if (element.isClass()) {
+ ClassElement cls = element;
+ cls.ensureResolved(compiler);
+ }
return scope.localLookup(name);
}
return null;

Powered by Google App Engine
This is Rietveld 408576698