harec

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

commit b335a2ad9f2ed3d974df889b75298047ef10e308
parent 3c068264d2a5701ad29d5efb3e549e46d1eb7beb
Author: Drew DeVault <sir@cmpwn.com>
Date:   Sun, 28 Feb 2021 10:47:15 -0500

check: fix return value expect

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

diff --git a/src/check.c b/src/check.c @@ -1726,7 +1726,7 @@ check_expr_return(struct context *ctx, rval->result = &builtin_type_void; } - expect(&aexpr->_return.value->loc, + expect(&aexpr->loc, type_is_assignable(ctx->fntype->func.result, rval->result), "Return value is not assignable to function result type"); if (ctx->fntype->func.result != rval->result) {