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

Unified Diff: lib/runtime/dart_sdk.js

Side-by-side diff isn't available for this file because of its large size.
Issue 1948253002: Fix subtyping for generic typedefs. Generic typedefs were being (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 7 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:
Download patch
« no previous file with comments | « no previous file | test/browser/runtime_tests.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart_sdk.js
diff --git a/lib/runtime/dart_sdk.js b/lib/runtime/dart_sdk.js
index 30a293d654be97f761c31299e974d07cb1132d8c..a6e19a8295beff5cc4f734773464d927ce53c73d 100644
--- a/lib/runtime/dart_sdk.js
+++ b/lib/runtime/dart_sdk.js
@@ -1122,8 +1122,10 @@ dart_library.library('dart_sdk', null, /* Imports */[
if (t1 === dart.dynamic) return null;
return false;
}
- let result = dart.isClassSubType(t1, t2, covariant);
- if (result === true || result === null) return result;
+ if (!(t1 instanceof dart.AbstractFunctionType) && !(t2 instanceof dart.AbstractFunctionType)) {
+ let result = dart.isClassSubType(t1, t2, covariant);
+ if (result === true || result === null) return result;
+ }
t1 = dart.getImplicitFunctionType(t1);
if (!t1) return false;
if (dart.isFunctionType(t1) && dart.isFunctionType(t2)) {
« no previous file with comments | « no previous file | test/browser/runtime_tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698