From e4502121f048b6ab23ecb199ec7aad194d9a6bf1 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Fri, 26 Jan 2018 10:56:03 -0800 Subject: [PATCH] Infer intersection types for multiple contravariant candidates --- 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 21fac5fe1e3..b9cd77966bc 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -11271,7 +11271,7 @@ namespace ts { function getTypeFromInference(inference: InferenceInfo) { return inference.candidates ? getUnionType(inference.candidates, UnionReduction.Subtype) : - inference.contraCandidates ? getCommonSubtype(inference.contraCandidates) : + inference.contraCandidates ? getIntersectionType(inference.contraCandidates) : undefined; }