From: Jérémie Astor Date: Fri, 14 Aug 2020 11:21:59 +0000 (+0200) Subject: :bug: Fix fptr inference X-Git-Tag: nightly~1375 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=5bb1a739619bd77da7c683ed71b181183565f19d;p=gwion.git :bug: Fix fptr inference --- diff --git a/src/lib/func.c b/src/lib/func.c index c644907a..8c0516d0 100644 --- a/src/lib/func.c +++ b/src/lib/func.c @@ -209,6 +209,8 @@ static OP_CHECK(opck_auto_fptr) { const Type t = fptr_def->type; free_fptr_def(env->gwion->mp, fptr_def); REM_REF(t, env->gwion) + bin->rhs->d.exp_decl.list->self->value->type = bin->rhs->info->type = bin->rhs->d.exp_decl.type = t; + exp_setvar(bin->rhs, 1); return ret > 0 ? t : env->gwion->type[et_null]; }