@@ -1457,9 +1457,8 @@ zend_string *zend_type_to_string_resolved(const zend_type type, zend_class_entry
1457
1457
str = add_type_string (str , resolved , /* is_intersection */ false);
1458
1458
zend_string_release (resolved );
1459
1459
} ZEND_TYPE_LIST_FOREACH_END ();
1460
- // TODO Is this still required?
1461
- //} else if (ZEND_TYPE_IS_ASSOCIATED(type)) {
1462
- // str = add_associated_type(ZEND_TYPE_NAME(type), scope);
1460
+ } else if (ZEND_TYPE_IS_ASSOCIATED (type )) {
1461
+ ZEND_ASSERT (false && "Generic type declarations do not exist yet" );
1463
1462
} else if (ZEND_TYPE_HAS_NAME (type )) {
1464
1463
str = resolve_class_name (ZEND_TYPE_NAME (type ), scope );
1465
1464
}
@@ -9082,20 +9081,19 @@ static void zend_compile_implements(zend_ast *ast) /* {{{ */
9082
9081
zend_resolve_const_class_name_reference_with_generics (interface_ast , "interface name" );
9083
9082
interface_names [i ].lc_name = zend_string_tolower (interface_names [i ].name );
9084
9083
9085
- // TODO, need the list to a type list
9086
9084
if (interface_ast -> child [1 ]) {
9087
9085
const zend_ast_list * generics_list = zend_ast_get_list (interface_ast -> child [1 ]);
9088
9086
const uint32_t num_generic_args = generics_list -> children ;
9089
9087
9090
- // TODO Check that we have the same number of generic args?
9088
+ // TODO Can we already check that we have correct number of generic args?
9091
9089
if (ce -> bound_types == NULL ) {
9092
9090
ALLOC_HASHTABLE (ce -> bound_types );
9093
- zend_hash_init (ce -> bound_types , list -> children - i , NULL , zend_bound_types_ht_dtor , false /* todo depend on internal or not */ );
9091
+ zend_hash_init (ce -> bound_types , list -> children - i , NULL , zend_bound_types_ht_dtor , false /* todo depend on internal or not? */ );
9094
9092
}
9095
9093
9096
9094
HashTable * bound_interface_types ;
9097
9095
ALLOC_HASHTABLE (bound_interface_types );
9098
- zend_hash_init (bound_interface_types , num_generic_args , NULL , zend_types_ht_dtor , false /* todo depend on internal or not */ );
9096
+ zend_hash_init (bound_interface_types , num_generic_args , NULL , zend_types_ht_dtor , false /* todo depend on internal or not? */ );
9099
9097
for (uint32_t generic_param = 0 ; generic_param < num_generic_args ; ++ generic_param ) {
9100
9098
zend_type bound_type = zend_compile_typename (generics_list -> child [generic_param ]);
9101
9099
zend_hash_index_add_mem (bound_interface_types , generic_param , & bound_type , sizeof (bound_type ));
0 commit comments