aboutsummaryrefslogtreecommitdiff
path: root/src/checker.cpp
diff options
context:
space:
mode:
authorFeoramund <161657516+Feoramund@users.noreply.github.com>2024-04-28 14:42:04 -0400
committerFeoramund <161657516+Feoramund@users.noreply.github.com>2024-04-28 14:42:04 -0400
commita573161abde810bcad561f60079f69d938497ce3 (patch)
tree9e99804b76aab0a731bcfba49845edffc4ef9cac /src/checker.cpp
parenta37826e646c4c88974fad9a9ff1749e55dc7f52f (diff)
Allow `@(init)` procs to be `@(disabled)`
Diffstat (limited to 'src/checker.cpp')
-rw-r--r--src/checker.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/checker.cpp b/src/checker.cpp
index 7e2d88982..70ca4fc47 100644
--- a/src/checker.cpp
+++ b/src/checker.cpp
@@ -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);