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

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

Issue 2752203003: Expand ignore whitelist to include FutureOr (Closed)
Patch Set: Created 3 years, 9 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/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/types.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/types.dart b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/types.dart
index ef253e0ca7c7956dce3b139a6d4af296e592e13e..4475a546052da9e2686174fc12db9158f1e385ac 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/types.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/types.dart
@@ -749,8 +749,11 @@ _isSubtype(t1, t2, isCovariant) => JS(
// t1 <: (Future<A> | A) iff t1 <: Future<A> or t1 <: A
let t2TypeArg = $getGenericArgs($t2)[0];
var t2Future = ${getGenericClass(Future)}(t2TypeArg);
- return $_isSubtype($t1, t2Future, $isCovariant) ||
- $_isSubtype($t1, t2TypeArg, $isCovariant);
+ let s1 = $_isSubtype($t1, t2Future, $isCovariant);
+ let s2 = $_isSubtype($t1, t2TypeArg, $isCovariant);
+ if (s1 === true || s2 === true) return true;
+ if (s1 === null || s2 === null) return null;
+ return false;
}
// "Traditional" name-based subtype check. Avoid passing
« no previous file with comments | « pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698