mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Remove special case for the error message of static properties in readonly classes
This commit is contained in:
parent
85d41da32a
commit
a3f8bb33cd
2 changed files with 1 additions and 7 deletions
|
@ -10,4 +10,4 @@ readonly class Foo
|
||||||
|
|
||||||
?>
|
?>
|
||||||
--EXPECTF--
|
--EXPECTF--
|
||||||
Fatal error: Readonly class Foo cannot declare static properties in %s on line %d
|
Fatal error: Static property Foo::$bar cannot be readonly in %s on line %d
|
||||||
|
|
|
@ -7256,12 +7256,6 @@ static void zend_compile_prop_decl(zend_ast *ast, zend_ast *type_ast, uint32_t f
|
||||||
zend_error_noreturn(E_COMPILE_ERROR, "Properties cannot be declared abstract");
|
zend_error_noreturn(E_COMPILE_ERROR, "Properties cannot be declared abstract");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ce->ce_flags & ZEND_ACC_READONLY_CLASS) && (flags & ZEND_ACC_STATIC)) {
|
|
||||||
zend_error_noreturn(E_COMPILE_ERROR, "Readonly class %s cannot declare static properties",
|
|
||||||
ZSTR_VAL(ce->name)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < children; ++i) {
|
for (i = 0; i < children; ++i) {
|
||||||
zend_property_info *info;
|
zend_property_info *info;
|
||||||
zend_ast *prop_ast = list->child[i];
|
zend_ast *prop_ast = list->child[i];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue