File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12777,7 +12777,9 @@ namespace ts {
1277712777 const widenLiteralTypes = inference.topLevel &&
1277812778 !hasPrimitiveConstraint(inference.typeParameter) &&
1277912779 (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;
1278112783 // If all inferences were made from contravariant positions, infer a common subtype. Otherwise, if
1278212784 // union types were requested or if all inferences were made from the return type position, infer a
1278312785 // union type. Otherwise, infer a common supertype.
You can’t perform that action at this time.
0 commit comments