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

Generic trait: type of a method parameter in an abstract method is not specified #10962

Closed
mxr576 opened this issue May 2, 2024 · 1 comment

Comments

@mxr576
Copy link
Contributor

mxr576 commented May 2, 2024

Bug report

I was experimenting with generic traits and it looks like I found a bug, see works() vs doesNotWork() methods.

Code snippet that reproduces the problem

https://phpstan.org/r/465f4f45-2dc7-4406-b82c-a21926d1bdc5

Expected output

57 Dumped type: int

and there is no missingType.parameter error.

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

Without PHPStan, I could even have a chance to play with generics at all in PHP.

@ondrejmirtes
Copy link
Member

Essentially a duplicate of #10914

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants