From b4df9c92d16fd68f33d24b6d1a52c1dfa09dd4ff Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Wed, 16 Dec 2020 02:53:58 +0100 Subject: [PATCH] :bug: Fix stmt_each for [][]... types --- src/parse/check.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/parse/check.c b/src/parse/check.c index f25ddaf0..27aa1254 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -942,6 +942,8 @@ ANN static m_bool do_stmt_each(const Env env, const Stmt_Each stmt) { char c[15 + strlen(ptr->name)]; sprintf(c, "@Foreach:[%s]", ptr->name); const Type ret = str2type(env->gwion, c, stmt->exp->pos); + if(ptr->array_depth) + set_tflag(ret, tflag_typedef); stmt->v = new_value(env->gwion->mp, ret, s_name(stmt->sym)); set_vflag(stmt->v, vflag_valid); nspc_add_value(env->curr, stmt->sym, stmt->v); -- 2.43.0