mirror of
https://github.com/php/php-src.git
synced 2026-04-11 18:13:00 +02:00
Merge branch 'PHP-7.4'
* PHP-7.4: Use unmangled named in property type inheritance error
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
--TEST--
|
||||
Typed property invariance violation for protected properties
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A { protected int $x; }
|
||||
class B extends A { protected $x; }
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Type of B::$x must be int (as in class A) in %s on line %d
|
||||
@@ -976,7 +976,7 @@ static void emit_incompatible_property_error(
|
||||
zend_error_noreturn(E_COMPILE_ERROR,
|
||||
"Type of %s::$%s must be %s (as in class %s)",
|
||||
ZSTR_VAL(child->ce->name),
|
||||
ZSTR_VAL(child->name),
|
||||
zend_get_unmangled_property_name(child->name),
|
||||
ZSTR_VAL(type_str),
|
||||
ZSTR_VAL(parent->ce->name));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user