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

Method ... never assigns ... so it can be removed from the by-ref type is wrong #10684

Closed
mvorisek opened this issue Mar 7, 2024 · 2 comments

Comments

@mvorisek
Copy link
Contributor

mvorisek commented Mar 7, 2024

Bug report

The reported error is wrong.

According to the https://github.com/phpstan/phpstan/releases/tag/1.10.60 changelog it seems it is caused by phpstan/phpstan-src#2941.

/cc @ljmaskey

Code snippet that reproduces the problem

https://phpstan.org/r/0b38e932-eef5-4069-a71e-cdf11d75234a

Expected output

no phpstan error

@mvorisek mvorisek changed the title Method ... never assigns ... so it can be removed from the by-ref type. Method ... never assigns ... so it can be removed from the by-ref type is wrong Mar 7, 2024
@ondrejmirtes
Copy link
Member

Fixed phpstan/phpstan-src@d1bcf78

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 Apr 14, 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

2 participants