Fixed bug that results in inconsistent diagnostics when surrounding an argument expression with parentheses. This addresses part of #8133.

This commit is contained in:
Eric Traut 2024-06-12 22:02:52 -07:00
parent 32f44d921a
commit 5cb16fe7e4

View File

@ -8064,11 +8064,7 @@ export function createTypeEvaluator(
// the base type of this call is not the same as one of the tracked signatures.
// This is important for nested generic calls (e.g. "foo(foo(x))").
if (signatureTracker) {
baseTypeResult.type = ensureFunctionSignaturesAreUnique(
baseTypeResult.type,
signatureTracker,
node.leftExpression.start
);
baseTypeResult.type = ensureFunctionSignaturesAreUnique(baseTypeResult.type, signatureTracker, node.start);
}
if (!isTypeAliasPlaceholder(baseTypeResult.type)) {