Skip to content

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Oct 13, 2017

These don't really make sense as variable types, most of the time.
Also, don't turn them into partial None types, since UninhabitedType
and None no longer have any correspondence.

Fixes #4104.

These don't really make sense as variable types, most of the time.
Also, don't turn them into partial None types, since UninhabitedType
and None no longer have any correspondence.
@JukkaL
Copy link
Collaborator Author

JukkaL commented Oct 13, 2017

Don't merge yet -- I want to fix an issue in internal Dropbox code first.

@ilevkivskyi
Copy link
Member

So does this fix the problem with:

def f() -> T: pass

x = f()
reveal_type(x)  # None

If yes then maybe it makes sense to add a test for this?

@JukkaL
Copy link
Collaborator Author

JukkaL commented Oct 13, 2017

Yes, there is an existing test case that was skipped (testUnderspecifiedInferenceResult).

@JukkaL
Copy link
Collaborator Author

JukkaL commented Oct 13, 2017

Updated the description to mention that this fixes #4104.

@ilevkivskyi
Copy link
Member

Ah, OK, but then #4059 should be updated after you merge this, since the reveal_type you added will start working.

@JukkaL JukkaL merged commit 1993fdf into master Oct 13, 2017
@gvanrossum gvanrossum deleted the infer-uninhabited branch October 13, 2017 18:04
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