GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
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
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.
Complain about inferring UninhabitedType for a variable
Don't merge yet -- I want to fix an issue in internal Dropbox code first.
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?
Yes, there is an existing test case that was skipped (testUnderspecifiedInferenceResult).
Updated the description to mention that this fixes #4104.
Ah, OK, but then #4059 should be updated after you merge this, since the reveal_type you added will start working.