Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Unified Diff: pkg/compiler/lib/src/types/types.dart

Issue 1318043005: Support user generated custom native JS classes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: ptal Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 6b1898117696ba0fbfc9516b144b25655dcb60ca..94113d7ca5c7ce5e29d1fc46506e9c026849a211 100644
--- a/pkg/compiler/lib/src/types/types.dart
+++ b/pkg/compiler/lib/src/types/types.dart
@@ -289,6 +289,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;
});
@@ -296,6 +300,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;

Powered by Google App Engine
This is Rietveld 408576698