From 3545dcb25a5ff485062dc795748cde6cb655365d Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Thu, 17 Dec 2020 06:33:22 -1000 Subject: [PATCH] With --strictFunctionTypes, always use strict variance for strict subtype relation --- 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 fa65b82f41b..b3309f83a76 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -16231,7 +16231,7 @@ namespace ts { return Ternary.False; } - const strictVariance = !(checkMode & SignatureCheckMode.Callback) && strictFunctionTypes && (isStrictSignature(target) || isStrictSignature(source)); + const strictVariance = !(checkMode & SignatureCheckMode.Callback) && strictFunctionTypes && (checkMode & SignatureCheckMode.StrictArity || isStrictSignature(target)); let result = Ternary.True; const sourceThisType = getThisTypeOfSignature(source);