Skip to content

Commit b9b6f8f

Browse files
committed
Simplify contextFlags binary check
1 parent 0534f9a commit b9b6f8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16123,7 +16123,7 @@ namespace ts {
1612316123
const constraint = getConstraintOfTypeParameter(inference.typeParameter);
1612416124
if (constraint) {
1612516125
const instantiatedConstraint = instantiateType(constraint, context.nonFixingMapper);
16126-
const isCompletionContext = contextFlags && ((contextFlags | ContextFlags.Completion) === contextFlags);
16126+
const isCompletionContext = contextFlags && (contextFlags & ContextFlags.Completion);
1612716127
if (!inferredType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType)) || isCompletionContext) {
1612816128
inference.inferredType = inferredType = instantiatedConstraint;
1612916129
}

0 commit comments

Comments
 (0)