Skip to content

Conversation

ilevkivskyi
Copy link
Member

Fixes #6417

Currently constraint inference against unions excludes trivially unsatisfiable items, but a corner case of a plain type variable was missing, so I add one.

(Note: this may help with constraint inference for recursive types.)

@ilevkivskyi ilevkivskyi requested a review from JukkaL November 11, 2019 15:40
Copy link
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

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

Thanks, type inference bugs are often frustrating to work around. One minor comment, otherwise looks good.

@ilevkivskyi ilevkivskyi merged commit 5b73e2a into python:master Nov 11, 2019
@ilevkivskyi ilevkivskyi deleted the add-union-inference-tests branch November 11, 2019 21:47
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.

Union[Generic[T], T]] does not work as expected as a parameter in the signature of a generic function

2 participants