diff --git a/mypy/fixup.py b/mypy/fixup.py index 11f07b1d4655..ec979e4e1927 100644 --- a/mypy/fixup.py +++ b/mypy/fixup.py @@ -188,11 +188,7 @@ def visit_callable_type(self, ct: CallableType) -> None: if ct.ret_type is not None: ct.ret_type.accept(self) for v in ct.variables: - if isinstance(v, TypeVarType): - if v.values: - for val in v.values: - val.accept(self) - v.upper_bound.accept(self) + v.accept(self) for arg in ct.bound_args: if arg: arg.accept(self) @@ -262,6 +258,8 @@ def visit_parameters(self, p: Parameters) -> None: for argt in p.arg_types: if argt is not None: argt.accept(self) + for var in p.variables: + var.accept(self) def visit_unbound_type(self, o: UnboundType) -> None: for a in o.args: