mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Improve error message when overriding untyped property with typed property (GH-16866)
This commit is contained in:
parent
4b211a7769
commit
e5c2bc41ed
3 changed files with 3 additions and 3 deletions
|
@ -1507,7 +1507,7 @@ static void do_inherit_property(zend_property_info *parent_info, zend_string *ke
|
|||
}
|
||||
} else if (UNEXPECTED(ZEND_TYPE_IS_SET(child_info->type) && !ZEND_TYPE_IS_SET(parent_info->type))) {
|
||||
zend_error_noreturn(E_COMPILE_ERROR,
|
||||
"Type of %s::$%s must not be defined (as in class %s)",
|
||||
"Type of %s::$%s must be omitted to match the parent definition in class %s",
|
||||
ZSTR_VAL(ce->name),
|
||||
ZSTR_VAL(key),
|
||||
ZSTR_VAL(parent_info->ce->name));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue