Skip to content

Always initialize mro in TypeInfo #5472

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

Merged
merged 1 commit into from
Aug 14, 2018
Merged

Always initialize mro in TypeInfo #5472

merged 1 commit into from
Aug 14, 2018

Conversation

msullivan
Copy link
Collaborator

Currently the mro is left None to cause accesses to it before it is
properly initialized to blow up more quickly. This sort of behavior
doesn't play well with mypyc, and leaving it actually uninitialized
causes a lot of blowups.

Just always initialize mro to an empty list.

Currently the mro is left `None` to cause accesses to it before it is
properly initialized to blow up more quickly. This sort of behavior
doesn't play well with mypyc, and leaving it actually uninitialized
causes a lot of blowups.

Just always initialize mro to an empty list.
Copy link
Member

@ilevkivskyi ilevkivskyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am fine with this. Could you please double check this with our internal code bases before merging?

@msullivan
Copy link
Collaborator Author

Looks good.

@msullivan msullivan merged commit 7416549 into master Aug 14, 2018
@msullivan msullivan deleted the populate-mro branch August 14, 2018 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants