Skip to content

Commit 3d2a393

Browse files
committed
Adjust misleading comment
1 parent 62695d8 commit 3d2a393

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Zend/zend_inheritance.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -399,13 +399,13 @@ static void track_class_dependency(zend_class_entry *ce, zend_string *class_name
399399
zend_hash_add_ptr(ht, class_name, ce);
400400
}
401401

402-
/* Check whether any type in fe_type is a subtype of the proto class.
403-
* This is independently of whether fe_type is a union or intersection. */
404-
static inheritance_status zend_is_any_type_subtype_of_class(
402+
/* Check whether any type in the fe_type intersection type is a subtype of the proto class. */
403+
static inheritance_status zend_is_intersection_subtype_of_class(
405404
zend_class_entry *fe_scope, zend_type fe_type,
406405
zend_class_entry *proto_scope, zend_string *proto_class_name, zend_class_entry *proto_ce,
407406
bool register_unresolved)
408407
{
408+
ZEND_ASSERT(ZEND_TYPE_IS_INTERSECTION(fe_type));
409409
bool have_unresolved = false;
410410
zend_type *single_type;
411411

@@ -605,7 +605,7 @@ static inheritance_status zend_perform_covariant_type_check(
605605
continue;
606606
}
607607

608-
status = zend_is_any_type_subtype_of_class(
608+
status = zend_is_intersection_subtype_of_class(
609609
fe_scope, fe_type, proto_scope, proto_class_name, proto_ce,
610610
/* register_unresolved */ false);
611611
if (status == early_exit_status) {
@@ -668,7 +668,7 @@ static inheritance_status zend_perform_covariant_type_check(
668668
continue;
669669
}
670670

671-
zend_is_any_type_subtype_of_class(
671+
zend_is_intersection_subtype_of_class(
672672
fe_scope, fe_type, proto_scope, proto_class_name, proto_ce,
673673
/* register_unresolved */ true);
674674
} ZEND_TYPE_FOREACH_END();

0 commit comments

Comments
 (0)