From: fennecdjay Date: Mon, 30 Sep 2019 21:30:43 +0000 (+0200) Subject: :art: Simplify subscript check X-Git-Tag: nightly~2198^2~211 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=73ca96e6f048877adcedca5e86b76646765e42e0;p=gwion.git :art: Simplify subscript check --- diff --git a/src/parse/check.c b/src/parse/check.c index 2dfe9668..0435deb6 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -40,8 +40,9 @@ ANN static m_bool check_implicit(const Env env, const m_str str, ANN m_bool check_exp_array_subscripts(const Env env, const Exp exp) { CHECK_OB(check_exp(env, exp)) + const Type t = env->gwion->type[et_int]; Exp e = exp; - do CHECK_BB(check_implicit(env, "@access", e, env->gwion->type[et_int])) + do CHECK_BB(check_implicit(env, "@access", e, t)) while((e = e->next)); return GW_OK; }