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

Unified Diff: tool/input_sdk/private/ddc_runtime/types.dart

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:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/browser/runtime_tests.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tool/input_sdk/private/ddc_runtime/types.dart
diff --git a/tool/input_sdk/private/ddc_runtime/types.dart b/tool/input_sdk/private/ddc_runtime/types.dart
index c3dabfd1ec02bd7edad5de3173e65dd62756ab8c..8c0f09a74192afb5844328748d8f3f8aa728cf77 100644
--- a/tool/input_sdk/private/ddc_runtime/types.dart
+++ b/tool/input_sdk/private/ddc_runtime/types.dart
@@ -510,8 +510,11 @@ isSubtype_(t1, t2, covariant) => JS('', '''(() => {
return false;
}
- // "Traditional" name-based subtype check.
- {
+ // "Traditional" name-based subtype check. Avoid passing
+ // function types to the class subtype checks, since we don't
+ // currently distinguish between generic typedefs and classes.
+ if (!($t1 instanceof $AbstractFunctionType) &&
+ !($t2 instanceof $AbstractFunctionType)) {
let result = $isClassSubType($t1, $t2, $covariant);
if (result === true || result === null) return result;
}
« no previous file with comments | « test/browser/runtime_tests.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698