phpstan-src
phpstan-src copied to clipboard
Implement template type inference from conditional return type
Fix for phpstan/phpstan#7141. This does not actually work yet, but fixing it in an obvious way breaks other tests
Also please add a test so that "is not referenced in a parameter" is not reported :) (but it should be reported if the template type is not referenced in a parameter nor in conditional type target).
Nice! Thank you very much.