harec

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

commit cbfd4c3356a887334f1a7d7d65d74c5cb6e3f121
parent e9c08905bc4808d39f52e83b404dc90fd020782b
Author: Eyal Sawady <ecs@d2evs.net>
Date:   Sun, 14 Mar 2021 17:10:19 -0400

check: improve message on check error in vaarg

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

diff --git a/src/check.c b/src/check.c @@ -912,8 +912,8 @@ lower_vaargs(struct context *ctx, const struct type *hint = type_store_lookup_array( ctx->store, type, SIZE_UNDEFINED); errors = check_expression(ctx, &val, vaargs, hint, errors); - assert(vaargs->result->storage == STORAGE_ARRAY); - if (vaargs->result->array.members != type) { + if (vaargs->result->storage != STORAGE_ARRAY + || vaargs->result->array.members != type) { return error(val.loc, vaargs, errors, "Argument is not assignable to variadic parameter type"); }