From: Jérémie Astor Date: Wed, 16 Dec 2020 01:53:58 +0000 (+0100) Subject: :bug: Fix stmt_each for [][]... types X-Git-Tag: nightly~1105^2~2 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=b4df9c92d16fd68f33d24b6d1a52c1dfa09dd4ff;p=gwion.git :bug: Fix stmt_each for [][]... types --- 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);