From: fennecdjay Date: Thu, 10 Oct 2019 17:25:42 +0000 (+0200) Subject: :art: Improve call fptr X-Git-Tag: nightly~2198^2~3 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=d3684637c8719aaef30b0c50c4d98f2d8432bdfd;p=gwion.git :art: Improve call fptr --- diff --git a/src/parse/check.c b/src/parse/check.c index a461dd65..39c31001 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -459,7 +459,7 @@ ANN static m_bool func_match_inner(const Env env, const Exp e, const Type t, } return match ? 1 : -1; } - +#include "context.h" ANN2(1,2) static Func find_func_match_actual(const Env env, Func func, const Exp args, const m_bool implicit, const m_bool specific) { do { @@ -567,11 +567,8 @@ CHECK_BO(check_call(env, exp)) fbase->tmpl->base = 0; fbase->tmpl->call = types; if(template_push_types(env, fbase->tmpl) > 0) { + assert(!value); const Fptr_Def fptr = new_fptr_def(env->gwion->mp, fbase, base->flag); - if(value) { - fptr->type = actual_type(env->gwion, value->type); - fptr->value = value; - } if(traverse_fptr_def(env, fptr) > 0 && (base->base->ret_type = known_type(env, base->base->td)) && (!exp->args || !!check_exp(env, exp->args))) {