Bug report
getChoice($right)->proceed(
right: noop(...),
left: fn (string $message) => throw new RuntimeException($message),
);
phpstan for some reason thinks the throw is the only path here and marks all code bellow as unreachable
Code snippet that reproduces the problem
https://phpstan.org/r/ce22c691-e5a5-4295-ab70-84643e71ab76
Expected output
No Unreachable statement - code above always terminates. violation
Did PHPStan help you today? Did it make you happy in any way?
No response
Bug report
phpstan for some reason thinks the throw is the only path here and marks all code bellow as unreachable
Code snippet that reproduces the problem
https://phpstan.org/r/ce22c691-e5a5-4295-ab70-84643e71ab76
Expected output
No
Unreachable statement - code above always terminates.violationDid PHPStan help you today? Did it make you happy in any way?
No response