From: fennecdjay Date: Tue, 9 Apr 2019 19:50:28 +0000 (+0200) Subject: :bug: more bugfixes (thanks to AFL) X-Git-Tag: nightly~2539 X-Git-Url: http://10.11.0.4:5575/?a=commitdiff_plain;h=5fb01ad4711c554f7ca3c902cc1b21c40cbf23f3;p=gwion.git :bug: more bugfixes (thanks to AFL) --- diff --git a/src/lib/array.c b/src/lib/array.c index f80904b7..dc6e349c 100644 --- a/src/lib/array.c +++ b/src/lib/array.c @@ -151,8 +151,14 @@ ANN static Type get_array_type(Type t) { static OP_CHECK(opck_array_at) { ARRAY_OPCK + if(opck_const_rhs(env, data) == t_null) + return t_null; if(bin->lhs->type->array_depth != bin->rhs->type->array_depth) ERR_N(exp_self(bin)->pos, "array depths do not match.") + if(bin->rhs->exp_type == ae_exp_decl) { + if(bin->rhs->d.exp_decl.list->self->array) + ERR_N(exp_self(bin)->pos, "do not provide array for 'xxx @=> declaration'.") + } bin->rhs->emit_var = 1; return bin->rhs->type; }