From d2397e0380876bc3eeb4cdaaefebe7b87e93b640 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 9 Jun 2019 10:05:55 -0700 Subject: [PATCH] Fix minor issue --- src/compiler/checker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 856e6bcd5d4..3bf8810a844 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -9889,7 +9889,7 @@ namespace ts { // a void-like type and a type known to be non-void-like, or // a non-primitive type and a type known to be primitive. if (includes & TypeFlags.Never || - includes & TypeFlags.Nullable && includes & (TypeFlags.Object | TypeFlags.NonPrimitive | TypeFlags.IncludesEmptyObject) || + strictNullChecks && includes & TypeFlags.Nullable && includes & (TypeFlags.Object | TypeFlags.NonPrimitive | TypeFlags.IncludesEmptyObject) || includes & TypeFlags.NonPrimitive && includes & (TypeFlags.DisjointDomains & ~TypeFlags.NonPrimitive) || includes & TypeFlags.StringLike && includes & (TypeFlags.DisjointDomains & ~TypeFlags.StringLike) || includes & TypeFlags.NumberLike && includes & (TypeFlags.DisjointDomains & ~TypeFlags.NumberLike) ||