From 122328e9d7d04e8f2935d70cd22df121101830fb Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Tue, 26 May 2020 19:26:48 +0200 Subject: [PATCH] :bug: Exp_If must set meta --- src/parse/check.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/parse/check.c b/src/parse/check.c index 81b4d5ec..274cc8cc 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -883,6 +883,8 @@ ANN static Type check_exp_if(const Env env, const Exp_If* exp_if) { ERR_O(exp_self(exp_if)->pos, _("condition type '%s' does not match '%s'"), cond->name, ret->name) + if(exp_getmeta(exp_if->if_exp ?: exp_if->cond) || exp_getmeta(exp_if->else_exp)) + exp_setmeta(exp_self(exp_if), 1); return ret; } -- 2.43.0