Skip to content

Commit

Permalink
Fixed bug that results in an incorrect "overlapping overload" error m…
Browse files Browse the repository at this point in the history
…essage in certain cases involving parameters annotated with `Self`. This addresses #9662. (#9698)
  • Loading branch information
erictraut authored Jan 14, 2025
1 parent 14b3c70 commit fb7989c
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions packages/pyright-internal/src/analyzer/typeEvaluator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit fb7989c

Please sign in to comment.