Bug report
If you have a match statement over a TypeSpecifying function, it does not correctly infer the type for each branch, as it does for switch or if statement. If it was missing everywhere, I would consider this a feature request, but as the behavior is not consistent across branching expressions, looks more like a bug to me.
Code snippet that reproduces the problem
https://phpstan.org/r/71638a26-f248-4b00-a161-7c6eb78ff75d
Expected output
Dumped type for match branches is not a union but the specified types, as is the case for if and switch.
Did PHPStan help you today? Did it make you happy in any way?
No response