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
Bug description
Pyre cannot reason about narrowing of literal types:
from typing import Literal, assert_never def foo(x: Literal["a", "b"]) -> str: if x == "a": return "a" if x == "b": return "b" else: assert_never(x)
This should obviously type check (and it does for pyright)
pyright
See Pyre playground
The text was updated successfully, but these errors were encountered:
yangdanny97
No branches or pull requests
Pyre Bug
Bug description
Pyre cannot reason about narrowing of literal types:
This should obviously type check (and it does for
pyright
)See Pyre playground
The text was updated successfully, but these errors were encountered: