Bug report
Passing some combinations of union types seems to break the closure param type inference.
For example, @param (\Closure(static<T>): void)|array<array-key, int> $column or @param (\Closure(Hello<T>): void)|array<array-key, int> $column works.
But * @param (\Closure(static<T>): void)|string|array<int, mixed> $column or @param (\Closure(static<T>): void)|array<array-key, int>|Bar $column does not work.
Code snippet that reproduces the problem
https://phpstan.org/r/24e0e585-9288-4b2a-95e9-8317dfd53426
Expected output
No error
Did PHPStan help you today? Did it make you happy in any way?