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

Erase typevars of generic types when used in Type[C] #3833

Merged
merged 1 commit into from Aug 16, 2017

Conversation

Projects
None yet
2 participants
@OddBloke
Contributor

OddBloke commented Aug 15, 2017

Prior to this commit, when generic types are used as the C in a Type[C]
expression, they don't have their typevars substituted; this leads to
the internal type variables of their implementations leaking out in a
way that makes them difficult to use.

Instead, we now erase those typevars to Any. This fixes #3824.

Erase typevars of generic types when used in Type[C]
Prior to this commit, when generic types are used as the C in a Type[C]
expression, they don't have their typevars substituted; this leads to
the internal type variables of their implementations leaking out in a
way that makes them difficult to use.

Instead, we now erase those typevars to Any.  This fixes #3824.
@ilevkivskyi

Thanks!

@ilevkivskyi ilevkivskyi merged commit c295f0c into python:master Aug 16, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment