@@ -1457,9 +1457,8 @@ zend_string *zend_type_to_string_resolved(const zend_type type, zend_class_entry
14571457 str = add_type_string (str , resolved , /* is_intersection */ false);
14581458 zend_string_release (resolved );
14591459 } 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" );
14631462 } else if (ZEND_TYPE_HAS_NAME (type )) {
14641463 str = resolve_class_name (ZEND_TYPE_NAME (type ), scope );
14651464 }
@@ -9082,20 +9081,19 @@ static void zend_compile_implements(zend_ast *ast) /* {{{ */
90829081 zend_resolve_const_class_name_reference_with_generics (interface_ast , "interface name" );
90839082 interface_names [i ].lc_name = zend_string_tolower (interface_names [i ].name );
90849083
9085- // TODO, need the list to a type list
90869084 if (interface_ast -> child [1 ]) {
90879085 const zend_ast_list * generics_list = zend_ast_get_list (interface_ast -> child [1 ]);
90889086 const uint32_t num_generic_args = generics_list -> children ;
90899087
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?
90919089 if (ce -> bound_types == NULL ) {
90929090 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? */ );
90949092 }
90959093
90969094 HashTable * bound_interface_types ;
90979095 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? */ );
90999097 for (uint32_t generic_param = 0 ; generic_param < num_generic_args ; ++ generic_param ) {
91009098 zend_type bound_type = zend_compile_typename (generics_list -> child [generic_param ]);
91019099 zend_hash_index_add_mem (bound_interface_types , generic_param , & bound_type , sizeof (bound_type ));
0 commit comments