From 1931c95d1a52051cdcedcb56b071c52686c379ed Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Sun, 13 Oct 2019 14:49:56 +0200 Subject: [PATCH] :art: Remove add_type_decl_array --- ast | 2 +- src/lib/import.c | 6 +++--- tests/import/extend_array.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ast b/ast index 3b10e725..22881b6f 160000 --- a/ast +++ b/ast @@ -1 +1 @@ -Subproject commit 3b10e725ee684180ba46f8b7166fc07ce8cacb9a +Subproject commit 22881b6f0a64d5c80d4142bd92dc67e9152961fa diff --git a/src/lib/import.c b/src/lib/import.c index 2eda223f..ee621c40 100644 --- a/src/lib/import.c +++ b/src/lib/import.c @@ -450,10 +450,10 @@ ANN Type_Decl* import_td(const Gwi gwi, const m_str name) { DECL_OO(const ID_List, type_path, = str2list(env, name, &array_depth, gwi->loc)) Type_Decl* type_decl = new_type_decl(env->gwion->mp, type_path); if(array_depth) { - Array_Sub array_sub = new_array_sub(env->gwion->mp, NULL); + Array_Sub array = new_array_sub(env->gwion->mp, NULL); for(m_uint i = 1; i < array_depth; i++) - array_sub = prepend_array_sub(array_sub, NULL); - type_decl = add_type_decl_array(type_decl, array_sub); + array = prepend_array_sub(array, NULL); + type_decl->array = array; } return type_decl; } diff --git a/tests/import/extend_array.c b/tests/import/extend_array.c index 9c4bc4a4..55bac891 100644 --- a/tests/import/extend_array.c +++ b/tests/import/extend_array.c @@ -21,7 +21,7 @@ GWION_IMPORT(extend_array_test) { Type_Decl* td = new_type_decl(gwi->gwion->st->p, new_id_list(gwi->gwion->st->p, insert_symbol(gwi->gwion->st, "float"), GWI_LOC)); Exp e = new_exp_prim_int(gwi->gwion->st->p, 1, GWI_LOC); Array_Sub array = new_array_sub(gwi->gwion->st->p, e); - add_type_decl_array(td, array); + td->array = array; GWI_BB(gwi_class_ext(gwi, td)) GWI_BB(gwi_class_end(gwi)) return GW_OK; -- 2.43.0