Index: pkg/compiler/lib/src/world.dart |
diff --git a/pkg/compiler/lib/src/world.dart b/pkg/compiler/lib/src/world.dart |
index 87090deb797ef77020dc2caf090676d0e593a610..527240fff429725ac943e76c06bf144aa4986778 100644 |
--- a/pkg/compiler/lib/src/world.dart |
+++ b/pkg/compiler/lib/src/world.dart |
@@ -18,6 +18,7 @@ import 'elements/elements.dart' |
MixinApplicationElement, |
TypedefElement, |
VariableElement; |
+import 'js_backend/backend.dart' show JavaScriptBackend; |
import 'ordered_typeset.dart'; |
import 'types/masks.dart' show TypeMask, FlatTypeMask; |
import 'universe/class_set.dart'; |
@@ -405,6 +406,9 @@ class World implements ClassWorld { |
@override |
ClassElement getLubOfInstantiatedSubclasses(ClassElement cls) { |
+ if (backend.isJsInterop(cls)) { |
+ return backend.helpers.jsJavaScriptObjectClass; |
+ } |
ClassHierarchyNode hierarchy = _classHierarchyNodes[cls.declaration]; |
return hierarchy != null |
? hierarchy.getLubOfInstantiatedSubclasses() |
@@ -413,6 +417,9 @@ class World implements ClassWorld { |
@override |
ClassElement getLubOfInstantiatedSubtypes(ClassElement cls) { |
+ if (backend.isJsInterop(cls)) { |
+ return backend.helpers.jsJavaScriptObjectClass; |
+ } |
ClassSet classSet = _classSets[cls.declaration]; |
return classSet != null ? classSet.getLubOfInstantiatedSubtypes() : null; |
} |
@@ -548,7 +555,7 @@ class World implements ClassWorld { |
} |
final Compiler compiler; |
- Backend get backend => compiler.backend; |
+ JavaScriptBackend get backend => compiler.backend; |
final FunctionSet allFunctions; |
final Set<Element> functionsCalledInLoop = new Set<Element>(); |
final Map<Element, SideEffects> sideEffects = new Map<Element, SideEffects>(); |