Bug report
When I use this combination of generics and union types, PHPStan reports an error falsely.
Code snippet that reproduces the problem
https://phpstan.org/r/a630ff19-a6d5-4b16-b677-1c543bce7310
Expected output
No error expected
Did PHPStan help you today? Did it make you happy in any way?
PHPStan absolutely helps us to have more trust in changes to our legacy codebase, which still needs a lot of tests.