Skip to content

Don't use joins during semantics analysis for typed dict #2489

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
JukkaL opened this issue Nov 24, 2016 · 1 comment · Fixed by #3560
Closed

Don't use joins during semantics analysis for typed dict #2489

JukkaL opened this issue Nov 24, 2016 · 1 comment · Fixed by #3560
Labels

Comments

@JukkaL
Copy link
Collaborator

JukkaL commented Nov 24, 2016

See discussion at #2342.

@JukkaL JukkaL added bug mypy got something wrong topic-typed-dict labels Nov 24, 2016
@JukkaL
Copy link
Collaborator Author

JukkaL commented Nov 24, 2016

Some ideas:

  1. Leave the fallback empty early during semantic analysis and fill it in as the final pass of semantic analysis.
  2. Make the fallback a property and calculate it lazily during type checking.

We probably don't want another full AST traversal just for this, as it would be expensive.

gvanrossum pushed a commit that referenced this issue Jun 21, 2017
Move join to happen after semantic analysis to avoid crash due to
incomplete MRO in TypeInfo. The implementation uses a new semantic
analysis 'patch' phase.

Fixes #3319. Fixes #2489. Fixes #3316.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant