From 3cd4e4dfc64aade5f66a10fcc21798ab05791d03 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Wed, 1 Apr 2020 18:37:27 +0200 Subject: [PATCH] :bug: Fix loop statement typechecking --- src/parse/check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.43.0