aboutsummaryrefslogtreecommitdiff
path: root/src/checker.cpp
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-06-17 12:01:53 +0100
committerGinger Bill <bill@gingerbill.org>2017-06-17 12:01:53 +0100
commit2deb2f8eebc42dd52ef8b78811c59e1b07f54f21 (patch)
tree6450f88b93b155bd1db798ee11f8ac03e7cc1f84 /src/checker.cpp
parent3fa398ec43ddc6fc40562087fd8ab87dc5292499 (diff)
Declaration grouping uses () rather than {}; Fix some problem with compilation on *nix
Diffstat (limited to 'src/checker.cpp')
-rw-r--r--src/checker.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/checker.cpp b/src/checker.cpp
index 0f8c2606a..c76c908d9 100644
--- a/src/checker.cpp
+++ b/src/checker.cpp
@@ -1585,7 +1585,7 @@ void check_collect_entities(Checker *c, Array<AstNode *> nodes, bool is_file_sco
error_node(name, "A declaration's name must be an identifier, got %.*s", LIT(ast_node_strings[name->kind]));
continue;
}
- Entity *e = make_entity_variable(c->allocator, c->context.scope, name->Ident, NULL, (gd->flags&VarDeclFlag_immutable) != 0);
+ Entity *e = make_entity_variable(c->allocator, c->context.scope, name->Ident, NULL, gd->token.kind == Token_let);
e->Variable.is_thread_local = (gd->flags & VarDeclFlag_thread_local) != 0;
e->identifier = name;
@@ -2005,7 +2005,7 @@ void check_import_entities(Checker *c, Map<Scope *> *file_scopes) {
continue;
}
if (operand.value.kind == ExactValue_Bool &&
- !operand.value.value_bool) {
+ operand.value.value_bool == false) {
continue;
}
}