-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
Description
While working on #3322 I have found two more crashes:
N = NamedTuple('N', [('x', N)])
n: Ncrashes with RecursionError and
class N(NamedTuple):
x: N
class M(NamedTuple):
x: M
n: N
m: M
lst = [n, m]crashes with AssertionError in join_instances_via_supertype. I didn't try TypedDict but most probably it will have similar problems.
There is actually a fundamental question here: what should be the join(N, M)? @JukkaL do you have any ideas? One possible option would be to detect recursive joins and just return object for them (maybe also UninhabitedType for recursive meets).