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
await
This is related to #12998.
https://mypy-play.net/?mypy=latest&python=3.12&gist=42bbd2ec432dbfd003429c64b8dc7435
from typing import assert_never async def fn() -> int | None: return None async def foo() -> None: match await fn(): case int(): pass case None: pass case never: assert_never(never) # error: Argument 1 to "assert_never" has incompatible type "int | None"; expected "NoReturn" [arg-type] async def bar() -> None: a = fn() match await a: case int(): pass case None: pass case never: assert_never(never) # error: Argument 1 to "assert_never" has incompatible type "int | None"; expected "NoReturn" [arg-type] async def baz() -> None: match _a := await fn(): case int(): pass case None: pass case never: assert_never(never) # works!
I also sent #17199 with a test case that demonstrates the bug.
The text was updated successfully, but these errors were encountered:
Add test documenting #17230 (#17199)
3579c61
No branches or pull requests
This is related to #12998.
https://mypy-play.net/?mypy=latest&python=3.12&gist=42bbd2ec432dbfd003429c64b8dc7435
I also sent #17199 with a test case that demonstrates the bug.
The text was updated successfully, but these errors were encountered: