From 5bb1a739619bd77da7c683ed71b181183565f19d Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Fri, 14 Aug 2020 13:21:59 +0200 Subject: [PATCH] :bug: Fix fptr inference --- src/lib/func.c | 2 ++ 1 file changed, 2 insertions(+) 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]; } -- 2.43.0