From 272de9ad4ba2ef9a4215b6196e371777f680add1 Mon Sep 17 00:00:00 2001 From: Akuli Date: Sat, 9 Apr 2022 18:56:08 +0300 Subject: [PATCH] use is_equivalent for everything except TypeVar and ParamSpec --- mypy/subtypes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mypy/subtypes.py b/mypy/subtypes.py index ba9d86f60cd6..087e10a04e6f 100644 --- a/mypy/subtypes.py +++ b/mypy/subtypes.py @@ -294,7 +294,7 @@ def visit_instance(self, left: Instance) -> bool: if not self.check_type_parameter(lefta, righta, COVARIANT): nominal = False else: - if not self.check_type_parameter(lefta, righta, COVARIANT): + if not is_equivalent(lefta, righta): nominal = False if nominal: TypeState.record_subtype_cache_entry(self._subtype_kind, left, right)