From: fennecdjay Date: Tue, 1 Oct 2019 19:26:14 +0000 (+0200) Subject: :art: try index_is_int X-Git-Tag: nightly~2198^2~206 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=1d9a7c8254758dce2ec09ab9f2166c803114fee0;p=gwion.git :art: try index_is_int --- diff --git a/src/parse/check.c b/src/parse/check.c index 92d200d3..0688d540 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -402,7 +402,10 @@ ANN static Type at_depth(const Env env, const Array_Sub array) { } static inline m_bool index_is_int(const Env env, Exp e, m_uint *depth) { - do CHECK_BB(check_implicit(env, "@access", e, env->gwion->type[et_int])) + do if(isa(e->type, env->gwion->type[et_int]) < 0) + ERR_B(e->pos, _("array index %i must be of type 'int', not '%s'"), + *depth, e->type->name) +// do CHECK_BB(check_implicit(env, "@access", e, env->gwion->type[et_int])) while(++(*depth) && (e = e->next)); return GW_OK; }