Use const & for Array<AstNode *> parameters

This commit is contained in:
gingerBill
2018-06-03 10:30:31 +01:00
parent 6202fb8373
commit 12b870ba66
13 changed files with 41 additions and 48 deletions
+7 -8
View File
@@ -2233,13 +2233,13 @@ void check_all_global_entities(Checker *c) {
GB_ASSERT(ctx.pkg != nullptr);
GB_ASSERT(e->pkg != nullptr);
if (e->token.string == "main") {
if (e->kind != Entity_Procedure) {
if (pkg->kind == Package_Init) {
error(e->token, "'main' is reserved as the entry point procedure in the initial scope");
continue;
}
} else if (pkg->kind == Package_Runtime) {
if (pkg->kind == Package_Init) {
if (e->kind != Entity_Procedure && e->token.string == "main") {
error(e->token, "'main' is reserved as the entry point procedure in the initial scope");
continue;
}
} else if (pkg->kind == Package_Runtime) {
if (e->token.string == "main") {
error(e->token, "'main' is reserved as the entry point procedure in the initial scope");
continue;
}
@@ -2249,7 +2249,6 @@ void check_all_global_entities(Checker *c) {
ctx.scope = d->scope;
check_entity_decl(&ctx, e, d, nullptr);
if (pkg->kind != Package_Runtime) {
processing_preload = false;
}