Closed as not planned
Description
from typing import assert_never
def foo(arg: tuple[int, int] | int) -> None:
match arg:
case (int() as a, int() as b):
print(f"{a}{b}")
case int() as c:
print(f"{c}")
case _:
assert_never(arg)
mypy . --strict
reports error: Argument 1 to "assert_never" has incompatible type "tuple[int, int]"; expected "NoReturn" [arg-type]
This feels odd? pyright
behaves as I'd expect, as the pattern match is exhaustive
Python 3.12.2
mypy 1.10.1 (compiled: yes)