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

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: about to land 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
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | pkg/compiler/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | pkg/compiler/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698