Index: sdk/lib/_internal/compiler/implementation/enqueue.dart |
diff --git a/sdk/lib/_internal/compiler/implementation/enqueue.dart b/sdk/lib/_internal/compiler/implementation/enqueue.dart |
index fd2f73cf00b7801afc6a081bae6d2c8748014dc7..e066fb555295bde5175092f94ab9c4162c749013 100644 |
--- a/sdk/lib/_internal/compiler/implementation/enqueue.dart |
+++ b/sdk/lib/_internal/compiler/implementation/enqueue.dart |
@@ -171,6 +171,7 @@ class Enqueuer { |
if (member.isField()) { |
// Native fields need to go into instanceMembersByName as they are virtual |
// instantiation points and escape points. |
+ // Test the enclosing class, since the metadata has not been parsed yet. |
if (!member.enclosingElement.isNative()) return; |
} |
@@ -210,6 +211,7 @@ class Enqueuer { |
} |
} else if (member.kind == ElementKind.FIELD && |
member.enclosingElement.isNative()) { |
+ nativeEnqueuer.registerField(member); |
if (universe.hasInvokedGetter(member, compiler) || |
universe.hasInvocation(member, compiler)) { |
nativeEnqueuer.registerFieldLoad(member); |