harec

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

commit 3590dcd12e9a5e356f2bc1e8dec66d64d13abf10
parent 508b0410ae64c0269182db470f4b962654d16cc2
Author: Drew DeVault <sir@cmpwn.com>
Date:   Mon,  4 Jan 2021 19:07:42 -0500

Carry const flag over via array access

Diffstat:
Msrc/check.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/check.c b/src/check.c @@ -100,7 +100,8 @@ check_expr_access(struct context *ctx, "Cannot use non-integer type as slice/array index"); expr->access.index = lower_implicit_cast( &builtin_type_size, expr->access.index); - expr->result = atype->array.members; + expr->result = type_store_lookup_with_flags(&ctx->store, + atype->array.members, atype->flags | atype->array.members->flags); break; case ACCESS_FIELD: assert(0); // TODO