Skip to content

Commit 96569b4

Browse files
committed
Fix expandtype with overloads
1 parent 0ae3b8d commit 96569b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypy/expandtype.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def visit_type_var(self, t: TypeVarType) -> Type:
231231
t = t.copy_modified(upper_bound=t.upper_bound.accept(self))
232232
repl = self.variables.get(t.id, t)
233233

234-
if has_type_vars(repl) and not isinstance(repl, TypeVarType):
234+
if has_type_vars(repl) and not isinstance(repl, (TypeVarType, Instance)):
235235
if repl in self.recursive_guard or isinstance(repl, (TypeVarType, CallableType)):
236236
return repl
237237
self.recursive_guard.add(repl)

0 commit comments

Comments
 (0)