Skip to content

Fix PartialType-related crash in --strict-optional #1992

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 5, 2016

Conversation

ddfisher
Copy link
Collaborator

@ddfisher ddfisher commented Aug 5, 2016

Some --strict-optional code previously assumed that the partial_types list could only contain PartialTypes. In some cases, it appears AnyType can also be part of that list. It's not entirely clear to me what causes this, but it looks like the correct solution is to be robust to the presence of other types in that list.

Fixes #1948.

@gvanrossum gvanrossum merged commit 72317c3 into master Aug 5, 2016
@gvanrossum gvanrossum deleted the fix-partial-types-crash branch August 6, 2016 21:05
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