From: Jérémie Astor Date: Wed, 1 Apr 2020 16:37:27 +0000 (+0200) Subject: :bug: Fix loop statement typechecking X-Git-Tag: nightly~1726^2~6 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=3cd4e4dfc64aade5f66a10fcc21798ab05791d03;p=gwion.git :bug: Fix loop statement typechecking --- diff --git a/src/parse/check.c b/src/parse/check.c index 2fc064d9..e0c17008 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -982,7 +982,7 @@ ANN static m_bool do_stmt_auto(const Env env, const Stmt_Auto stmt) { ANN static inline m_bool cond_type(const Env env, const Exp e) { const Type t_int = env->gwion->type[et_int]; - if(check_implicit(env, e, t_int)) + if(check_implicit(env, e, t_int) < 0) ERR_B(e->pos, _("invalid condition type")) return GW_OK; }