From 5cb16fe7e4564e20e265afd20f73c530f275c40b Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Wed, 12 Jun 2024 22:02:52 -0700 Subject: [PATCH] Fixed bug that results in inconsistent diagnostics when surrounding an argument expression with parentheses. This addresses part of #8133. --- packages/pyright-internal/src/analyzer/typeEvaluator.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/pyright-internal/src/analyzer/typeEvaluator.ts b/packages/pyright-internal/src/analyzer/typeEvaluator.ts index ad670dd6e..c46461ae7 100644 --- a/packages/pyright-internal/src/analyzer/typeEvaluator.ts +++ b/packages/pyright-internal/src/analyzer/typeEvaluator.ts @@ -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)) {