| Index: pkg/dev_compiler/lib/js/legacy/dart_sdk.js
|
| diff --git a/pkg/dev_compiler/lib/js/legacy/dart_sdk.js b/pkg/dev_compiler/lib/js/legacy/dart_sdk.js
|
| index cf5ca5dd0360f5148c5deb9103e1903cda459444..1fca021e87462ae6df7f6404e739b9bf5a0f4027 100644
|
| --- a/pkg/dev_compiler/lib/js/legacy/dart_sdk.js
|
| +++ b/pkg/dev_compiler/lib/js/legacy/dart_sdk.js
|
| @@ -1715,10 +1715,6 @@ dart_library.library('dart_sdk', null, /* Imports */[
|
| return null;
|
| }
|
| }
|
| - if (ret2 === dart.void) return true;
|
| - if (ret1 === dart.void) {
|
| - return ret2 === dart.dynamic || ret2 === async.FutureOr;
|
| - }
|
| if (!dart._isSubtype(ret1, ret2, isCovariant)) return null;
|
| return true;
|
| };
|
| @@ -1739,13 +1735,13 @@ dart_library.library('dart_sdk', null, /* Imports */[
|
| };
|
| };
|
| dart._isBottom = function(type) {
|
| - return type == dart.bottom;
|
| + return type == dart.bottom || type == core.Null;
|
| };
|
| dart._isTop = function(type) {
|
| if (dart.getGenericClass(type) === dart.getGenericClass(async.FutureOr)) {
|
| return dart._isTop(dart.getGenericArgs(type)[0]);
|
| }
|
| - return type == core.Object || type == dart.dynamic;
|
| + return type == core.Object || type == dart.dynamic || type == dart.void;
|
| };
|
| dart._isSubtype = function(t1, t2, isCovariant) {
|
| if (t1 === t2) return true;
|
| @@ -2224,6 +2220,9 @@ dart_library.library('dart_sdk', null, /* Imports */[
|
| return false;
|
| };
|
| dart.is = function(obj, type) {
|
| + if (obj == null) {
|
| + return type == core.Null || dart._isTop(type);
|
| + }
|
| let result = dart.strongInstanceOf(obj, type);
|
| if (result !== null) return result;
|
| let actual = dart.getReifiedType(obj);
|
|
|