-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Improve error message when overriding untyped property with typed property #16866
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
Conversation
I think you're misunderstanding the message. The problem is not that it is already defined, but that it is defined differently. The message says the type must be omitted, "as in class X". |
I just got this error message while updating a very large code base. The error message didn't quite help me so I am trying to make it easier to understand. Maybe this version is better? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll also need to update tests.
Co-authored-by: Ilija Tovilo <[email protected]>
thanks for the excellent suggestion! |
I only found these tests. |
Zend/tests/type_declarations/mixed/inheritance/mixed_property_inheritance_error7.phpt
Outdated
Show resolved
Hide resolved
Thank you @chx! |
No description provided.