Index: pkg/compiler/lib/src/native/behavior.dart |
diff --git a/pkg/compiler/lib/src/native/behavior.dart b/pkg/compiler/lib/src/native/behavior.dart |
index 5a03ca015c54f41294b23cef3691e78d089dcba4..347dfcf82afc835ba5545234d018e2cfaeb1e90e 100644 |
--- a/pkg/compiler/lib/src/native/behavior.dart |
+++ b/pkg/compiler/lib/src/native/behavior.dart |
@@ -818,8 +818,9 @@ class NativeBehavior { |
// annotations. This means that to some degree we still use the return |
// type to decide whether to include native types, even if we don't |
// trust the type annotation. |
- typesInstantiated.add( |
- backend.helpers.jsJavaScriptObjectClass.thisType); |
+ ClassElement cls = backend.helpers.jsJavaScriptObjectClass; |
+ cls.ensureResolved(resolution); |
+ typesInstantiated.add(cls.thisType); |
} else { |
// Otherwise, when the declared type is a Dart type, we do not |
// register an allocation because we assume it cannot be instantiated |