From: Jérémie Astor Date: Sat, 7 Aug 2021 01:33:41 +0000 (+0200) Subject: :bug: Fix array concat emission (simplify) X-Git-Tag: nightly~479 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=9bc1cb5d9199f21e259f17aac1838f98cc69897a;p=gwion.git :bug: Fix array concat emission (simplify) --- diff --git a/src/lib/array.c b/src/lib/array.c index cba963e0..c8102fd9 100644 --- a/src/lib/array.c +++ b/src/lib/array.c @@ -129,8 +129,7 @@ static OP_CHECK(opck_array_at) { } ANN static inline bool shift_match(const Type base, const Type more) { - return isa(more, base) > 0 && - get_depth(base) == get_depth(more); + return get_depth(base) == get_depth(more); } ANN static Type check_array_shift(const Env env, const Exp a, const Exp b, @@ -139,7 +138,7 @@ ANN static Type check_array_shift(const Env env, const Exp a, const Exp b, b->type->array_depth > 1) return a->type;*/ ARRAY_OPCK(a, b, pos) - if (a->type->array_depth == b->type->array_depth + 1) + if (get_depth(a->type) == get_depth(b->type) + 1) return a->type; else if (shift_match(a->type, b->type)) return a->type;