Fix infinite recursion for template intersection type accepts()#1450
Conversation
| if ($acceptingType instanceof self || ($acceptingType instanceof UnionType && !$acceptingType instanceof TemplateUnionType)) { | ||
| return $acceptingType->accepts($this, $strictTypes); | ||
| } | ||
|
|
There was a problem hiding this comment.
Nothing appears to break by removing this 🤷♂️
|
Thank you! Removing code is always nice 😊 |
|
@rvanvelzen @ondrejmirtes Am I wrong or the testBug7500 shouldn't report any error ? https://phpstan.org/r/29203f2e-5b6c-46bf-b91a-baf7d3839591 works fine is it should be Should I open an issue ? |
|
@VincentLanglet Comments on closed PRs tend to get lost, please open a new bug report about this, thanks. |
|
Yes I did it @ondrejmirtes phpstan/phpstan#7511 with a simpler reproducer |
Fixes phpstan/phpstan#7500