From 01519f2fd5dc7551291c2e54d5e9b1d4c97df92f Mon Sep 17 00:00:00 2001 From: Ginger Bill Date: Sun, 13 Aug 2017 22:09:26 +0100 Subject: Fix `push_allocator` --- src/check_stmt.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/check_stmt.cpp') diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp index 8d74c4f17..8c7586a12 100644 --- a/src/check_stmt.cpp +++ b/src/check_stmt.cpp @@ -1073,6 +1073,7 @@ void check_stmt_internal(Checker *c, AstNode *node, u32 flags) { goto skip_expr; } } else if (operand.mode != Addressing_Invalid) { + bool is_ptr = is_type_pointer(operand.type); Type *t = base_type(type_deref(operand.type)); switch (t->kind) { case Type_Basic: @@ -1138,7 +1139,8 @@ void check_stmt_internal(Checker *c, AstNode *node, u32 flags) { found = current_scope_lookup_entity(c->context.scope, str); } if (found == nullptr) { - entity = make_entity_variable(c->allocator, c->context.scope, token, type, true); + bool is_immutable = true; + entity = make_entity_variable(c->allocator, c->context.scope, token, type, is_immutable); add_entity_definition(&c->info, name, entity); } else { TokenPos pos = found->token.pos; -- cgit v1.2.3