File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -12777,7 +12777,9 @@ namespace ts {
12777
12777
const widenLiteralTypes = inference.topLevel &&
12778
12778
!hasPrimitiveConstraint(inference.typeParameter) &&
12779
12779
(inference.isFixed || !isTypeParameterAtTopLevel(getReturnTypeOfSignature(signature), inference.typeParameter));
12780
- const baseCandidates = widenLiteralTypes ? sameMap(candidates, getWidenedLiteralType) : candidates;
12780
+ const baseCandidates = widenLiteralTypes ? sameMap(candidates, getWidenedLiteralType) :
12781
+ hasPrimitiveConstraint(inference.typeParameter) ? sameMap(candidates, getRegularTypeOfLiteralType) :
12782
+ candidates;
12781
12783
// If all inferences were made from contravariant positions, infer a common subtype. Otherwise, if
12782
12784
// union types were requested or if all inferences were made from the return type position, infer a
12783
12785
// union type. Otherwise, infer a common supertype.
You can’t perform that action at this time.
0 commit comments