aboutsummaryrefslogtreecommitdiff
path: root/src/check_decl.cpp
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-07-07 23:42:43 +0100
committerGinger Bill <bill@gingerbill.org>2017-07-07 23:42:43 +0100
commit4b051a0d3b9da924924ed2a28ef7c102902a880c (patch)
tree11ac611a92c608097b1af289d71a6ac21c9b4900 /src/check_decl.cpp
parent45353465a6d743f9c9cbca63c45877a6d294feb5 (diff)
`..` half closed range; `...` open range; `...` variadic syntax
Diffstat (limited to 'src/check_decl.cpp')
-rw-r--r--src/check_decl.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp
index b6e2acb26..ea457fcf3 100644
--- a/src/check_decl.cpp
+++ b/src/check_decl.cpp
@@ -79,6 +79,7 @@ void check_init_variables(Checker *c, Entity **lhs, isize lhs_count, Array<AstNo
gbTempArenaMemory tmp = gb_temp_arena_memory_begin(&c->tmp_arena);
+ defer (gb_temp_arena_memory_end(tmp));
// NOTE(bill): If there is a bad syntax error, rhs > lhs which would mean there would need to be
// an extra allocation
@@ -100,9 +101,6 @@ void check_init_variables(Checker *c, Entity **lhs, isize lhs_count, Array<AstNo
if (rhs_count > 0 && lhs_count != rhs_count) {
error(lhs[0]->token, "Assignment count mismatch `%td` = `%td`", lhs_count, rhs_count);
}
-
-
- gb_temp_arena_memory_end(tmp);
}
void check_init_constant(Checker *c, Entity *e, Operand *operand) {