mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-01 10:52:19 +00:00
Merge pull request #3505 from Feoramund/allow-disabled-init-procs
Allow `@(init)` procs to be `@(disabled)`
This commit is contained in:
@@ -2535,6 +2535,11 @@ gb_internal void generate_minimum_dependency_set_internal(Checker *c, Entity *st
|
||||
is_init = false;
|
||||
}
|
||||
|
||||
if ((e->flags & EntityFlag_Disabled) != 0) {
|
||||
warning(e->token, "This @(init) procedure is disabled; you must call it manually");
|
||||
is_init = false;
|
||||
}
|
||||
|
||||
if (is_init) {
|
||||
add_dependency_to_set(c, e);
|
||||
array_add(&c->info.init_procedures, e);
|
||||
|
||||
Reference in New Issue
Block a user