Index: pkg/compiler/lib/src/common_elements.dart |
diff --git a/pkg/compiler/lib/src/common_elements.dart b/pkg/compiler/lib/src/common_elements.dart |
index d9d9a5584bca52c946d7dc32f22c54bd77b9c7e1..0c7edc97a9f675256dfbbb8030bcdf82b1e22482 100644 |
--- a/pkg/compiler/lib/src/common_elements.dart |
+++ b/pkg/compiler/lib/src/common_elements.dart |
@@ -13,6 +13,7 @@ import 'elements/names.dart' show PublicName; |
import 'elements/types.dart'; |
import 'js_backend/backend.dart' show JavaScriptBackend; |
import 'js_backend/constant_system_javascript.dart'; |
+import 'js_backend/native_data.dart' show NativeBasicData; |
import 'universe/call_structure.dart' show CallStructure; |
import 'universe/selector.dart' show Selector; |
import 'universe/call_structure.dart'; |
@@ -1176,6 +1177,17 @@ class CommonElements { |
cls == jsInterceptorClass || |
cls == jsNullClass; |
} |
+ |
+ ClassEntity getDefaultSuperclass( |
+ ClassEntity cls, NativeBasicData nativeBasicData) { |
+ if (nativeBasicData.isJsInteropClass(cls)) { |
+ return jsJavaScriptObjectClass; |
+ } |
+ // Native classes inherit from Interceptor. |
+ return nativeBasicData.isNativeClass(cls) |
+ ? jsInterceptorClass |
+ : objectClass; |
+ } |
} |
/// Interface for accessing libraries, classes and members. |