Bug report
Type inference seems to break when calling methods that use a callable's return as a template type for a the returned value, if that callable is a first class callable.
Code snippet that reproduces the problem
https://phpstan.org/r/975298d0-951e-4c81-96d6-d19c9a83be4a
Expected output
I expected both syntaxes the have the same inferred type, I think PHPStan is missing a condition somewhere to take first class callables into account and as a result the template type is never resolved
Did PHPStan help you today? Did it make you happy in any way?
No response