summaryrefslogtreecommitdiff
path: root/Zend/zend_inheritance.c
diff options
context:
space:
mode:
authorMáté Kocsis <kocsismate@woohoolabs.com>2020-03-27 23:39:49 +0100
committerMáté Kocsis <kocsismate@woohoolabs.com>2020-05-22 16:08:12 +0200
commitaec4c0fd031ad557527ff6c888a1b60048bb1cdc (patch)
tree2f437957be3862d543c45a2db6c4e5e44f9ff1df /Zend/zend_inheritance.c
parent4bc1d8333aa8b40a6c6fe89762f6b5a4bd309a1c (diff)
downloadphp-git-aec4c0fd031ad557527ff6c888a1b60048bb1cdc.tar.gz
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>
Diffstat (limited to 'Zend/zend_inheritance.c')
-rw-r--r--Zend/zend_inheritance.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c
index 72f4888228..f42998a8f8 100644
--- a/Zend/zend_inheritance.c
+++ b/Zend/zend_inheritance.c
@@ -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;
}