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
playground
from typing import assert_never def returns_union() -> int | float | None: return None def broken() -> None: match returns_union(): case None: pass case int(): pass case float(): pass case never: assert_never(never) # error: Argument 1 to "assert_never" has incompatible type "int | float | None"; expected "NoReturn" [arg-type] def not_broken() -> None: match _ := returns_union(): # assignment to unused variable fixes the problem case None: pass case int(): pass case float(): pass case never: assert_never(never)
The text was updated successfully, but these errors were encountered:
Oops, duplicate of #12998, fixed on master.
Sorry, something went wrong.
No branches or pull requests
playground
The text was updated successfully, but these errors were encountered: