From 73ca96e6f048877adcedca5e86b76646765e42e0 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Mon, 30 Sep 2019 23:30:43 +0200 Subject: [PATCH] :art: Simplify subscript check --- src/parse/check.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.43.0