Chromium Code Reviews| Index: pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart |
| diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart |
| index 9eba1b2c3ad6fb79a9bfcc0a2b007cc5ea2579c6..4390f87809a902809580c4fdda432152aa50cfd4 100644 |
| --- a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart |
| +++ b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart |
| @@ -470,8 +470,16 @@ final _ignoreTypeFailure = JS( |
| // TODO(vsm): Remove this hack ... |
| // This is primarily due to the lack of generic methods, |
| // but we need to triage all the types. |
| + if ($_isFutureOr($type)) { |
|
Leaf
2017/03/31 16:21:45
I think this should just be type, not $type, no?
vsm
2017/03/31 16:24:57
Done.
|
| + // Ignore if we would ignore either side of union. |
| + let typeArg = $getGenericArgs($type)[0]; |
| + let typeFuture = ${getGenericClass(Future)}(typeArg); |
| + return $_ignoreTypeFailure(actual, typeFuture) || |
| + $_ignoreTypeFailure(actual, typeArg); |
| + } |
| + |
| if (!!$isSubtype(type, $Iterable) && !!$isSubtype(actual, $Iterable) || |
| - !!$isSubtype(type, $FutureOr) && !!$isSubtype(actual, $Future) || |
| + !!$isSubtype(type, $Future) && !!$isSubtype(actual, $Future) || |
| !!$isSubtype(type, $Map) && !!$isSubtype(actual, $Map) || |
| $isFunctionType(type) && $isFunctionType(actual) || |
| !!$isSubtype(type, $Stream) && !!$isSubtype(actual, $Stream) || |