aboutsummaryrefslogtreecommitdiff
path: root/src/checker.cpp
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2024-04-29 12:03:54 +0100
committerGitHub <noreply@github.com>2024-04-29 12:03:54 +0100
commitd6824ea6077ef5709aa72f3484f341bfc16bbae7 (patch)
tree1c08a8ddb6839ca4d25a1f4d7958f34a1b9a3f52 /src/checker.cpp
parent2f88ded81a5ff691fda30054e1626f231af96cd8 (diff)
parenta573161abde810bcad561f60079f69d938497ce3 (diff)
Merge pull request #3505 from Feoramund/allow-disabled-init-procs
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);