From a0e12c7b75250a19279ebe034d3b98ac7917c398 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Wed, 7 Feb 2018 12:48:44 -0800 Subject: [PATCH] Use typeMaybeAssignableTo in definitely false check --- 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 3b1771d2096..948be393e00 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -8144,7 +8144,7 @@ namespace ts { // types with type parameters mapped to the wildcard type, the most permissive instantiations // possible (the wildcard type is assignable to and from all types). If those are not related, // then no instatiations will be and we can just return the false branch type. - if (!isTypeAssignableTo(getWildcardInstantiation(checkType), getWildcardInstantiation(extendsType))) { + if (!typeMaybeAssignableTo(getWildcardInstantiation(checkType), getWildcardInstantiation(extendsType))) { return instantiateType(baseFalseType, mapper); } // The check could be true for some instantiation