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

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, 3 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 a06404b12d2db3c3c5229b693da3f3346aa49c61..224c8b560247d6beedc13a0b14bcada2ab4ee10d 100644
--- a/pkg/compiler/lib/src/types/types.dart
+++ b/pkg/compiler/lib/src/types/types.dart
@@ -295,6 +295,9 @@ class TypesTask extends CompilerTask {
*/
TypeMask getGuaranteedTypeOfElement(Element element) {
return measure(() {
+ if (element.isJsInterop) {
+ return dynamicType;
+ }
TypeMask guaranteedType = typesInferrer.getTypeOfElement(element);
return (concreteTypesInferrer == null)
? guaranteedType
@@ -306,6 +309,10 @@ class TypesTask extends CompilerTask {
TypeMask getGuaranteedReturnTypeOfElement(Element element) {
return measure(() {
+ if (element.isJsInterop) {
+ return dynamicType;
+ }
+
TypeMask guaranteedType =
typesInferrer.getReturnTypeOfElement(element);
return (concreteTypesInferrer == null)

Powered by Google App Engine
This is Rietveld 408576698