@@ -2756,7 +2756,7 @@ ZEND_API void zend_add_magic_method(zend_class_entry *ce, zend_function *fptr, z
2756
2756
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX (arg_info_toString , 0 , 0 , IS_STRING , 0 )
2757
2757
ZEND_END_ARG_INFO ()
2758
2758
2759
- static zend_always_inline void upgrade_internal_type (zend_type * type ) {
2759
+ static zend_always_inline void normalize_internal_type (zend_type * type ) {
2760
2760
ZEND_ASSERT (!ZEND_TYPE_HAS_LITERAL_NAME (* type ));
2761
2761
zend_type * current ;
2762
2762
ZEND_TYPE_FOREACH (* type , current ) {
@@ -2767,6 +2767,7 @@ static zend_always_inline void upgrade_internal_type(zend_type *type) {
2767
2767
} else if (ZEND_TYPE_HAS_LIST (* current )) {
2768
2768
zend_type * inner ;
2769
2769
ZEND_TYPE_FOREACH (* current , inner ) {
2770
+ ZEND_ASSERT (!ZEND_TYPE_HAS_LITERAL_NAME (* inner ) && !ZEND_TYPE_HAS_LIST (* inner ));
2770
2771
if (ZEND_TYPE_HAS_NAME (* inner )) {
2771
2772
zend_string * name = zend_new_interned_string (ZEND_TYPE_NAME (* inner ));
2772
2773
zend_alloc_ce_cache (name );
@@ -3009,7 +3010,7 @@ ZEND_API zend_result zend_register_functions(zend_class_entry *scope, const zend
3009
3010
new_arg_info [i ].type = legacy_iterable ;
3010
3011
}
3011
3012
3012
- upgrade_internal_type (& new_arg_info [i ].type );
3013
+ normalize_internal_type (& new_arg_info [i ].type );
3013
3014
}
3014
3015
}
3015
3016
@@ -4396,7 +4397,7 @@ ZEND_API zend_property_info *zend_declare_typed_property(zend_class_entry *ce, z
4396
4397
property_info -> type = type ;
4397
4398
4398
4399
if (is_persistent_class (ce )) {
4399
- upgrade_internal_type (& property_info -> type );
4400
+ normalize_internal_type (& property_info -> type );
4400
4401
}
4401
4402
4402
4403
zend_hash_update_ptr (& ce -> properties_info , name , property_info );
0 commit comments