Skip to content

Fix crash when assigning to partial type - #2772

Merged
gvanrossum merged 3 commits into
python:masterfrom
afrieder:crash
Feb 6, 2017
Merged

gvanrossum merged 3 commits into
python:masterfrom
afrieder:crash

Conversation

@afrieder

Copy link
Copy Markdown
Contributor

Fixes #1587

def f(x: AnyStr) -> Tuple[AnyStr]: pass
x = None
(x,) = f('')

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can you add reveal_type(x) here to verify that we infer the correct type for x?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

@gvanrossum
gvanrossum merged commit 351d2af into python:master Feb 6, 2017
@gvanrossum

Copy link
Copy Markdown
Member

Thanks!

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.

3 participants