File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -463,6 +463,28 @@ static inheritance_status zend_is_class_subtype_of_type(
463463 * class is the subtype of at least one of them (union) or all of them (intersection). */
464464 bool is_intersection = ZEND_TYPE_IS_INTERSECTION (proto_type );
465465 ZEND_TYPE_FOREACH (proto_type , single_type ) {
466+ if (ZEND_TYPE_IS_INTERSECTION (* single_type )) {
467+ inheritance_status subtype_status = zend_is_class_subtype_of_type (
468+ fe_scope , fe_class_name , proto_scope , * single_type );
469+
470+ switch (subtype_status ) {
471+ case INHERITANCE_ERROR :
472+ if (is_intersection ) {
473+ return INHERITANCE_ERROR ;
474+ }
475+ continue ;
476+ case INHERITANCE_UNRESOLVED :
477+ have_unresolved = 1 ;
478+ continue ;
479+ case INHERITANCE_SUCCESS :
480+ if (!is_intersection ) {
481+ return INHERITANCE_SUCCESS ;
482+ }
483+ continue ;
484+ EMPTY_SWITCH_DEFAULT_CASE ();
485+ }
486+ }
487+
466488 zend_class_entry * proto_ce ;
467489 zend_string * proto_class_name = NULL ;
468490 if (ZEND_TYPE_HAS_NAME (* single_type )) {
You can’t perform that action at this time.
0 commit comments