You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry, this is an old problem. Also there are similar things with other "synthetic types" TypedDict, NewType, aliases etc. that don't work well in the forward-reference context. I was going to work on this, but didn't get to it yet. I will keep this open, since here you provide use-cases that are not mentioned in other issues.
This code typechecks cleanly:
But add a self-referential attribute to the NamedTuple:
And now we get:
If
Person
is an ordinary class instead of aNamedTuple
, the error doesn't appear.The text was updated successfully, but these errors were encountered: