From c461531f228c6ce79d62afabcab8dfc8eeecc269 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Tue, 22 Oct 2019 13:36:45 +0200 Subject: [PATCH] :art: More testing --- src/lib/import.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/import.c b/src/lib/import.c index 9fdbf0c4..d55cdf06 100644 --- a/src/lib/import.c +++ b/src/lib/import.c @@ -700,7 +700,7 @@ ANN m_int gwi_typedef_ini(const Gwi gwi, const restrict m_str type, const restri ANN Type gwi_typedef_end(const Gwi gwi, const ae_flag flag) { - struct func_checker ck = { .name=gwi->func.name, .flag=flag }; + struct func_checker ck = { .name=gwi->val.name, .flag=flag }; CHECK_BO(check_typename_def(gwi, &ck)) Type_Decl* td = import_td(gwi, gwi->val.type); if(td) { @@ -754,13 +754,14 @@ ANN m_int gwi_union_add(const Gwi gwi, const restrict m_str type, const restrict } ANN static Type union_type(const Gwi gwi, const Union_Def udef) { + CHECK_BO(scan0_union_def(gwi->gwion->env, udef)) CHECK_BO(traverse_union_def(gwi->gwion->env, udef)) emit_union_offset(udef->l, udef->o); if(gwi->gwion->env->class_def && !GET_FLAG(udef, static)) gwi->gwion->env->class_def->nspc->info->offset = udef->o + udef->s; return udef->xid ? udef->value->type : - udef->type_xid ? udef->type : gwi->gwion->type[et_int]; + udef->type_xid ? udef->type : udef->value->type; } ANN Type gwi_union_end(const Gwi gwi, const ae_flag flag) { -- 2.43.0