From: fennecdjay Date: Sun, 9 Jun 2019 16:42:14 +0000 (+0200) Subject: :art: Fex fixes X-Git-Tag: nightly~2443^2~4 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=8553f0a511589b7e1a083a20d5ab4d6be556c528;p=gwion.git :art: Fex fixes --- diff --git a/src/lib/func.c b/src/lib/func.c index 22a9d7a1..70efd95e 100644 --- a/src/lib/func.c +++ b/src/lib/func.c @@ -15,6 +15,7 @@ #include "nspc.h" #include "operator.h" #include "traverse.h" +#include "template.h" #include "parse.h" ANN Type check_exp_call1(const Env env, const Exp_Call *exp); @@ -67,14 +68,13 @@ ANN static m_bool fptr_tmpl_push(const Env env, struct FptrInfo *info) { return GW_OK; ID_List t0 = info->lhs->def->base->tmpl->list, t1 = info->rhs->def->base->tmpl->list; - nspc_push_type(env->gwion->mp, env->curr); while(t0) { CHECK_OB(t1) - nspc_add_type(env->curr, t0->xid, t_undefined); - nspc_add_type(env->curr, t1->xid, t_undefined); t0 = t0->next; t1 = t1->next; } + CHECK_BB(template_push_types(env, info->lhs->def->base->tmpl)) + CHECK_BB(template_push_types(env, info->rhs->def->base->tmpl)) return GW_OK; } diff --git a/src/lib/vararg.c b/src/lib/vararg.c index 226f81bf..47b5dda8 100644 --- a/src/lib/vararg.c +++ b/src/lib/vararg.c @@ -56,7 +56,7 @@ INSTR(VarargEnd) { } INSTR(VarargMember) { - const struct Vararg_* arg = *(struct Vararg_**)MEM(instr->m_val); + struct Vararg_* arg = *(struct Vararg_**)MEM(instr->m_val); if(instr->m_val2 != arg->k[arg->i]) { // TODO: differnciate object and primitives free_vararg(shred->info->mp, arg); Except(shred, "InvalidVariadicAccess");