]> Nishi Git Mirror - gwion.git/commitdiff
:bug: Fix fptr inference
authorJérémie Astor <astor.jeremie@wanadoo.fr>
Fri, 14 Aug 2020 11:21:59 +0000 (13:21 +0200)
committerJérémie Astor <astor.jeremie@wanadoo.fr>
Fri, 14 Aug 2020 11:21:59 +0000 (13:21 +0200)
src/lib/func.c

index c644907a37065d86ae05f261814c050bfd6c9f9d..8c0516d05c500a312f79bf6c317b4eb2f86a242d 100644 (file)
@@ -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];
 }