Skip to content

Commit f914bef

Browse files
committed
Only do that for recursive aliases?
1 parent 95eb26c commit f914bef

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

mypy/meet.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,12 @@ def is_overlapping_types(
346346
seen_types = set()
347347
elif (left, right) in seen_types:
348348
return True
349-
if isinstance(left, TypeAliasType) or isinstance(right, TypeAliasType):
349+
if (
350+
isinstance(left, TypeAliasType)
351+
and left.is_recursive
352+
or isinstance(right, TypeAliasType)
353+
and right.is_recursive
354+
):
350355
seen_types.add((left, right))
351356

352357
left, right = get_proper_types((left, right))

0 commit comments

Comments
 (0)