From: Jérémie Astor Date: Tue, 16 Nov 2021 19:59:17 +0000 (+0100) Subject: :art: make loop idx value constant X-Git-Tag: nightly~408 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=3c48924f1330d51163a3d01b693f62bf00176fc5;p=gwion.git :art: make loop idx value constant --- diff --git a/src/parse/check.c b/src/parse/check.c index b572a14e..03e05fa3 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -1167,6 +1167,7 @@ ANN static void check_idx(const Env env, const Type base, struct EachIdx_ *const idx->v = new_value(env->gwion->mp, base, s_name(idx->sym)); valuefrom(env, idx->v->from, idx->pos); valid_value(env, idx->sym, idx->v); + SET_FLAG(idx->v, const); } /** sets for the key expression value