harec

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

commit 95984ce8778697edd8eace87e2b6a9ec460dc39f
parent f637476ca9a6b10b59cb64ad2bd275f904fddaea
Author: Drew DeVault <sir@cmpwn.com>
Date:   Sun,  7 Feb 2021 10:21:50 -0500

check: log affected type in error message

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

diff --git a/src/check.c b/src/check.c @@ -99,7 +99,8 @@ check_expr_access(struct context *ctx, case O_TYPE: expect(&aexpr->loc, type_dealias(obj->type)->storage == TYPE_STORAGE_VOID, - "Cannot use non-void type alias as constant"); + "Cannot use non-void type alias '%s' as constant", + identifier_unparse(&obj->type->alias.ident)); expr->type = EXPR_CONSTANT; expr->result = obj->type; break;