harec

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

commit a1a6ec6cd41923bcfde29730086b22fd97edd651
parent de0f6e09c1f773363f69e1a96212d8ab7b48e548
Author: Drew DeVault <sir@cmpwn.com>
Date:   Sun, 14 Mar 2021 16:11:26 -0400

eval: implement slice defaults

Diffstat:
Msrc/eval.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/eval.c b/src/eval.c @@ -465,6 +465,7 @@ constant_default(struct context *ctx, struct expression *v) v->constant.string.len = 0; break; case STORAGE_ARRAY: + case STORAGE_SLICE: v->constant.array = xcalloc(1, sizeof(struct array_constant)); v->constant.array->expand = true; v->constant.array->value = xcalloc(1, sizeof(struct expression)); @@ -474,7 +475,6 @@ constant_default(struct context *ctx, struct expression *v) constant_default(ctx, v->constant.array->value); break; case STORAGE_TAGGED: - case STORAGE_SLICE: case STORAGE_TUPLE: assert(0); // TODO case STORAGE_ALIAS: