Skip to content

Commit 863fc2c

Browse files
committed
Simplify contextFlags binary check
1 parent 6b6e41e commit 863fc2c

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
@@ -16018,7 +16018,7 @@ namespace ts {
1601816018
const constraint = getConstraintOfTypeParameter(inference.typeParameter);
1601916019
if (constraint) {
1602016020
const instantiatedConstraint = instantiateType(constraint, context.nonFixingMapper);
16021-
const isCompletionContext = contextFlags && ((contextFlags | ContextFlags.Completion) === contextFlags);
16021+
const isCompletionContext = contextFlags && (contextFlags & ContextFlags.Completion);
1602216022
if (!inferredType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType)) || isCompletionContext) {
1602316023
inference.inferredType = inferredType = instantiatedConstraint;
1602416024
}

0 commit comments

Comments
 (0)