From 57282f76f3eaf48c5678ce2a9c34f21cd66d1749 Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Sat, 6 Jan 2024 21:46:24 -0700 Subject: [PATCH] Fixed a bug that led to a duplicate error message when defining a class-scoped type alias. --- packages/pyright-internal/src/analyzer/typeEvaluator.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/pyright-internal/src/analyzer/typeEvaluator.ts b/packages/pyright-internal/src/analyzer/typeEvaluator.ts index f314c6a0c513..f785425ebfe4 100644 --- a/packages/pyright-internal/src/analyzer/typeEvaluator.ts +++ b/packages/pyright-internal/src/analyzer/typeEvaluator.ts @@ -15768,7 +15768,7 @@ export function createTypeEvaluator(importLookup: ImportLookup, evaluatorOptions rightHandType = transformTypeForTypeAlias( rightHandType, typeAliasNameNode, - node.rightExpression, + typeAliasNameNode, /* isPep695Syntax */ false, /* isPep695TypeVarType */ false ); @@ -15918,7 +15918,7 @@ export function createTypeEvaluator(importLookup: ImportLookup, evaluatorOptions aliasType = transformTypeForTypeAlias( aliasType, nameNode, - valueNode, + nameNode, isPep695Syntax, /* isPep695TypeVarType */ true, typeParameters,