Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix crashes in synthetic types #3322
UPDATE: see #3322 (comment) below.
This PR adds better processing of "synthetic" types (
Additional fourth pass seems to be an overkill for this. Although, I have a big project in my future plans (probably after we are more or less done with protocols): providing better support for forward references (there are a dozen similar issues about this) and recursive types. Even for this fourth pass seems to be a bit an overkill, and I would rather proceed as Jukka proposed in option (3) in #1701 (comment)
Using unions as fallbacks for typed dicts has the problem that the union could be arbitrarily complex for a typed dict with multiple nested typed dicts, etc. It's actually just the kind of situation where unions may not be a good option. My current thinking is basically like this:
Also, we use