Bug report
Given generic instance with specific template type T (eg. string), this instance can't be passed to generic parameter which specifies T as compatible union (eg. string|int).
Code snippet that reproduces the problem
https://phpstan.org/r/280fa009-69dc-4515-8b09-5bbaee07eb61
Expected output
Considering the more specific instance is clearly subset of the parameter type, I believe it should be accepted.
My real-life union was actually about nullable instance, eg. Foo|NULL.