harec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 986a745e06f5ba2112e447f069317f8c2c3429a5
parent 4e8eb0bad77315611e11b3183d03a48c294c67be
Author: Drew DeVault <sir@cmpwn.com>
Date:   Sat, 27 Mar 2021 09:28:36 -0400

gen: fix slice allocation from arrays

Diffstat:
Msrc/gen.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/gen.c b/src/gen.c @@ -553,6 +553,8 @@ gen_slice_alloc(struct gen_context *ctx, pushi(ctx->current, NULL, Q_STOREL, &cap, &ptr, NULL); if (initializer->result->storage == STORAGE_ARRAY) { + ret.type = qtype_for_type(ctx, initializer->result, true); + ret.indirect = false; gen_expression(ctx, initializer, &ret); } else { // TODO: I think this will have to be a separate branch once