commit bc74a47db98570d4706d704ceb6eec8ee1a84edc
parent de45920036f7ef0f6297bd30d123a83b0e5787f2
Author: Drew DeVault <sir@cmpwn.com>
Date: Fri, 12 Feb 2021 09:01:37 -0500
check: fix lowering of static bindings
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/check.c b/src/check.c
@@ -708,7 +708,8 @@ check_expr_binding(struct context *ctx,
if (abinding->is_static) {
struct expression *value =
xcalloc(1, sizeof(struct expression));
- enum eval_result r = eval_expr(ctx, initializer, value);
+ enum eval_result r = eval_expr(
+ ctx, binding->initializer, value);
expect(&abinding->initializer->loc, r == EVAL_OK,
"Unable to evaluate static initializer at compile time");
// TODO: Free initializer