phpstan-src icon indicating copy to clipboard operation
phpstan-src copied to clipboard

Implement template type inference from conditional return type

Open rvanvelzen opened this issue 3 years ago • 1 comments

Fix for phpstan/phpstan#7141. This does not actually work yet, but fixing it in an obvious way breaks other tests

rvanvelzen avatar Jun 23 '22 09:06 rvanvelzen

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).

ondrejmirtes avatar Jun 23 '22 09:06 ondrejmirtes

Nice! Thank you very much.

ondrejmirtes avatar Sep 19 '22 14:09 ondrejmirtes