mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-29 02:40:05 +00:00
Use const & for Array<AstNode *> parameters
This commit is contained in:
+7
-8
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user