Closed
Description
Take this simple example with reportUnnecessaryComparison
set to warning
from typing import assert_never
def get_foo() -> int | str:
...
foo = get_foo()
match foo:
case int():
...
case str():
...
case _: # Pattern will never be matched for subject type "Never" (reportUnnecessaryComparison)
assert_never(foo)
This was working fine on previous versions.