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

Return type of method ... should be compatible with return type of method ... thrown when using traits and return type self (with strict rules and bleeding edge) #10166

Closed
jacekkarczmarczyk opened this issue Nov 20, 2023 · 3 comments

Comments

@jacekkarczmarczyk
Copy link

Bug report

Function in trait with return type self is treated as a function with return type being the trait instead of the class where this trait is being used

Code snippet that reproduces the problem

https://phpstan.org/r/7a01f18e-cae1-44bc-809b-68c392afce05

Expected output

No error

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

It helps me every day! :)

@ondrejmirtes
Copy link
Member

Fixed: phpstan/phpstan-src@85fcd5f

@jacekkarczmarczyk
Copy link
Author

Thank you!

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 Dec 22, 2023
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