| Index: pkg/compiler/lib/src/js_backend/backend.dart
|
| diff --git a/pkg/compiler/lib/src/js_backend/backend.dart b/pkg/compiler/lib/src/js_backend/backend.dart
|
| index b79556e5e4187959d86c68965a39ea7851c8ac39..b9c86b1ab0c0452e410b38f0aa5c9b3983d3e6ee 100644
|
| --- a/pkg/compiler/lib/src/js_backend/backend.dart
|
| +++ b/pkg/compiler/lib/src/js_backend/backend.dart
|
| @@ -1113,7 +1113,7 @@ class JavaScriptBackend extends Backend {
|
| type.isFunctionType ? coreTypes.functionType : type;
|
| if (type is InterfaceType) {
|
| registry.registerInstantiation(instantiatedType);
|
| - if (!type.treatAsRaw && classNeedsRti(type.element)) {
|
| + if (classNeedsRti(type.element)) {
|
| registry.registerStaticUse(new StaticUse.staticInvoke(
|
| // TODO(johnniwinther): Find the right [CallStructure].
|
| helpers.setRuntimeTypeInfo,
|
| @@ -1486,8 +1486,10 @@ class JavaScriptBackend extends Backend {
|
| }
|
|
|
| bool classNeedsRti(ClassElement cls) {
|
| - return rti.classesNeedingRti.contains(cls.declaration) ||
|
| - compiler.enabledRuntimeType;
|
| + if (cls.rawType.typeArguments.isEmpty) return false;
|
| + if (rti.classesNeedingRti.contains(cls.declaration)) return true;
|
| + if (compiler.enabledRuntimeType) return true; // Needed e.g. to print.
|
| + return false;
|
| }
|
|
|
| bool isComplexNoSuchMethod(FunctionElement element) =>
|
|
|