-
-
Notifications
You must be signed in to change notification settings - Fork 863
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 foo() on an unknown class FooBar when FooBar is a trait #7720
Comments
But this code cannot really work, right? You can't initiate traits, so you can't pass them to a method. Also Maybe you can try to use |
Thanks. Indeed, I though class using a trait |
I'd like the "impossible instanceof rule" to report it doesn't work with traits 😊 Also ObjectType::isSuperTypeOf() should return No if thisReflection or theirReflection is a trair. |
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. |
Bug report
Code snippet that reproduces the problem
https://phpstan.org/r/21864fe8-ba76-4945-b9fc-9dc27e286ca1
Expected output
I expect no error for the code above.
Did PHPStan help you today? Did it make you happy in any way?
This snippet system with try is still very cool to be sure in a blink if current version has the same output.
The text was updated successfully, but these errors were encountered: