mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Add support for the mixed type
RFC: https://wiki.php.net/rfc/mixed_type_v2 Closes GH-5313 Co-authored-by: Dan Ackroyd <danack@basereality.com>
This commit is contained in:
parent
4bc1d8333a
commit
aec4c0fd03
55 changed files with 927 additions and 15 deletions
|
@ -507,8 +507,8 @@ static inheritance_status zend_do_perform_arg_type_hint_check(
|
|||
zend_class_entry *fe_scope, zend_arg_info *fe_arg_info,
|
||||
zend_class_entry *proto_scope, zend_arg_info *proto_arg_info) /* {{{ */
|
||||
{
|
||||
if (!ZEND_TYPE_IS_SET(fe_arg_info->type)) {
|
||||
/* Child with no type is always compatible */
|
||||
if (!ZEND_TYPE_IS_SET(fe_arg_info->type) || ZEND_TYPE_PURE_MASK(fe_arg_info->type) == MAY_BE_ANY) {
|
||||
/* Child with no type or mixed type is always compatible */
|
||||
return INHERITANCE_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue