Commit 8bff6442337 for php.net
commit 8bff64423377fb0c3c2ef279bdaf18e40e21a1c8
Author: Gina Peter Banyard <girgias@php.net>
Date: Mon Mar 9 16:00:30 2026 +0000
Zend: remove unused scope parameter of add_intersection_type()
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 23db72bb4fd..94956f990a0 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -1417,7 +1417,7 @@ static zend_string *resolve_class_name(zend_string *name, const zend_class_entry
}
static zend_string *add_intersection_type(zend_string *str,
- const zend_type_list *intersection_type_list, zend_class_entry *scope,
+ const zend_type_list *intersection_type_list,
bool is_bracketed)
{
const zend_type *single_type;
@@ -1448,13 +1448,13 @@ zend_string *zend_type_to_string_resolved(const zend_type type, zend_class_entry
/* Pure intersection type */
if (ZEND_TYPE_IS_INTERSECTION(type)) {
ZEND_ASSERT(!ZEND_TYPE_IS_UNION(type));
- str = add_intersection_type(str, ZEND_TYPE_LIST(type), scope, /* is_bracketed */ false);
+ str = add_intersection_type(str, ZEND_TYPE_LIST(type), /* is_bracketed */ false);
} else if (ZEND_TYPE_HAS_LIST(type)) {
/* A union type might not be a list */
const zend_type *list_type;
ZEND_TYPE_LIST_FOREACH(ZEND_TYPE_LIST(type), list_type) {
if (ZEND_TYPE_IS_INTERSECTION(*list_type)) {
- str = add_intersection_type(str, ZEND_TYPE_LIST(*list_type), scope, /* is_bracketed */ true);
+ str = add_intersection_type(str, ZEND_TYPE_LIST(*list_type), /* is_bracketed */ true);
continue;
}
ZEND_ASSERT(!ZEND_TYPE_HAS_LIST(*list_type));