Closed
Description
from typing import Callable, ParamSpec
P = ParamSpec("P")
class Foo:
def __call__(self) -> None:
...
def foo(fn: Callable[P, None]) -> None:
if isinstance(fn, Foo):
print("reached") # error: Statement is unreachable [unreachable]
foo(Foo())
in this example, that line is always reached at runtime