diff --git a/core/type.c b/core/type.c index 818080c..99b6aaf 100644 --- a/core/type.c +++ b/core/type.c @@ -142,7 +142,7 @@ static b_result locate_interface( struct b_type_registration *interface_reg = get_type(&type_list, interface_id); if (!interface_reg) { - return B_RESULT_ERR(NO_MEMORY); + return B_RESULT_ERR(NO_ENTRY); } interface_comp = create_type_component(interface_reg); @@ -150,6 +150,8 @@ static b_result locate_interface( return B_RESULT_ERR(NO_MEMORY); } + initialise_type_component(interface_comp, interface_reg->r_info, init_ctx); + put_type_component(&dest->r_components, interface_comp); return B_RESULT_SUCCESS; } @@ -211,6 +213,7 @@ static b_result find_type_components(struct b_type_registration *reg) /* circular class dependency */ // result = B_RESULT_ERR(INVALID_ARGUMENT); // break; + current_id = &dep_class->r_info->t_parent_id; continue; } @@ -245,6 +248,7 @@ static b_result find_type_components(struct b_type_registration *reg) comp = b_unbox(struct b_type_component, node, c_node); if (comp->c_type->r_category == B_TYPE_CLASS) { /* this component was already initialised above */ + node = b_btree_next(node); continue; }