We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
We currently infer a type of Literal[1, 2, 4] in the following example, but 1 is not a possible value of x. And 3 is a possible value for x.
Literal[1, 2, 4]
1
x
3
def check(x: int) -> bool: ... if check(x := 1): x = 2 elif check(x := 3): x = 4 reveal_type(x) # revealed: Literal[1, 2, 4]; should be Literal[2, 3, 4]
The text was updated successfully, but these errors were encountered:
2ea6362
Successfully merging a pull request may close this issue.
We currently infer a type of
Literal[1, 2, 4]
in the following example, but1
is not a possible value ofx
. And3
is a possible value forx
.The text was updated successfully, but these errors were encountered: