From 03f5b9a9963be1935aacd27799155d5d7115cedb Mon Sep 17 00:00:00 2001 From: Leo Tenenbaum Date: Tue, 10 Mar 2020 17:55:07 -0400 Subject: some minor things involving varargs for loop --- types.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types.c b/types.c index da0889a..74f0c55 100644 --- a/types.c +++ b/types.c @@ -1624,6 +1624,7 @@ static Status types_expr(Typer *tr, Expression *e) { sub->stmts[0].where = e->where; /* declare value */ Declaration *decl = sub->stmts[0].decl = typer_calloc(tr, 1, sizeof *decl); + decl->where = fo->of->where; *(Identifier *)arr_adda(&decl->idents, tr->allocr) = fo->value; fo->value->decl_kind = IDECL_DECL; fo->value->decl = decl; @@ -1634,6 +1635,7 @@ static Status types_expr(Typer *tr, Expression *e) { Expression *index = decl->expr.binary.rhs = typer_calloc(tr, 1, sizeof *decl->expr.binary.rhs); index->kind = EXPR_LITERAL_INT; index->intl = (U64)i; + index->where = fo->of->where; } size_t start = has_val; for (size_t s = start; s < total_nstmts; ++s) { -- cgit v1.2.3