Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Call to method PureImpl::doFoo() on a separate line has no effect." - false positive #11011

Closed
staabm opened this issue May 14, 2024 · 3 comments

Comments

@staabm
Copy link
Contributor

staabm commented May 14, 2024

Bug report

I am actually not sure whether its a false positive. the errors started showing up with 1.11.x.

the errors goes away when the PureImpl::doFoo method is explictily declared phpstan-pure - but this would mean I have to add a lot of these annotations with 1.11.x

Code snippet that reproduces the problem

https://phpstan.org/r/b9ac551c-f7c7-41c2-8f3e-114298338871

Expected output

maybe no error on line 19?

Did PHPStan help you today? Did it make you happy in any way?

No response

@mvorisek
Copy link
Contributor

IMO this is a bug as long as one unioned callable target is impure.

@ondrejmirtes
Copy link
Member

Fixed phpstan/phpstan-src@ee33f1e

Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants