From fb7989c8cbfe6e212e140a63a7fbc07cbfe0cc96 Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Mon, 13 Jan 2025 17:27:10 -0700 Subject: [PATCH] Fixed bug that results in an incorrect "overlapping overload" error message in certain cases involving parameters annotated with `Self`. This addresses #9662. (#9698) --- .../pyright-internal/src/analyzer/typeEvaluator.ts | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/packages/pyright-internal/src/analyzer/typeEvaluator.ts b/packages/pyright-internal/src/analyzer/typeEvaluator.ts index 6c8b76877181..bf6d08df3a13 100644 --- a/packages/pyright-internal/src/analyzer/typeEvaluator.ts +++ b/packages/pyright-internal/src/analyzer/typeEvaluator.ts @@ -25709,18 +25709,6 @@ export function createTypeEvaluator( flags: AssignTypeFlags, recursionCount: number ) { - // Handle the special case where the dest type is a synthesized - // "self" for a protocol class. - if ( - isTypeVar(destType) && - destType.shared.isSynthesized && - destType.shared.boundType && - isClassInstance(destType.shared.boundType) && - ClassType.isProtocolClass(destType.shared.boundType) - ) { - return true; - } - if (isTypeVarTuple(destType) && !isUnpacked(srcType)) { return false; }