Index: pkg/compiler/lib/src/types/types.dart |
diff --git a/pkg/compiler/lib/src/types/types.dart b/pkg/compiler/lib/src/types/types.dart |
index 42dbae5b76649150119fbb2552812fcb2c17413b..9d91f99ff7380b22aa009e8a15427bd78c2c3e1a 100644 |
--- a/pkg/compiler/lib/src/types/types.dart |
+++ b/pkg/compiler/lib/src/types/types.dart |
@@ -286,6 +286,10 @@ class TypesTask extends CompilerTask { |
*/ |
TypeMask getGuaranteedTypeOfElement(Element element) { |
return measure(() { |
+ // TODO(24489): trust some JsInterop types. |
+ if (element.isJsInterop) { |
+ return dynamicType; |
+ } |
TypeMask guaranteedType = typesInferrer.getTypeOfElement(element); |
return guaranteedType; |
}); |
@@ -293,6 +297,11 @@ class TypesTask extends CompilerTask { |
TypeMask getGuaranteedReturnTypeOfElement(Element element) { |
return measure(() { |
+ // TODO(24489): trust some JsInterop types. |
+ if (element.isJsInterop) { |
+ return dynamicType; |
+ } |
+ |
TypeMask guaranteedType = |
typesInferrer.getReturnTypeOfElement(element); |
return guaranteedType; |