Small code cleanup. No functional change.

This commit is contained in:
Eric Traut 2024-06-29 06:50:29 -07:00
parent 16f398976a
commit fa0f6b7349

View File

@ -16138,6 +16138,7 @@ export function createTypeEvaluator(
writeTypeCache(node.rightExpression, { type: rightHandType }, EvaluatorFlags.None); writeTypeCache(node.rightExpression, { type: rightHandType }, EvaluatorFlags.None);
} }
} }
}
if (!rightHandType) { if (!rightHandType) {
// Determine whether there is a declared type. // Determine whether there is a declared type.
@ -16197,11 +16198,7 @@ export function createTypeEvaluator(
} }
} }
const srcTypeResult = getTypeOfExpression( const srcTypeResult = getTypeOfExpression(node.rightExpression, flags, makeInferenceContext(declaredType));
node.rightExpression,
flags,
makeInferenceContext(declaredType)
);
let srcType = srcTypeResult.type; let srcType = srcTypeResult.type;
expectedTypeDiagAddendum = srcTypeResult.expectedTypeDiagAddendum; expectedTypeDiagAddendum = srcTypeResult.expectedTypeDiagAddendum;
if (srcTypeResult.isIncomplete) { if (srcTypeResult.isIncomplete) {
@ -16261,7 +16258,6 @@ export function createTypeEvaluator(
} }
} }
} }
}
assignTypeToExpression( assignTypeToExpression(
node.leftExpression, node.leftExpression,