diff options
| author | Feoramund <161657516+Feoramund@users.noreply.github.com> | 2024-04-28 14:42:04 -0400 |
|---|---|---|
| committer | Feoramund <161657516+Feoramund@users.noreply.github.com> | 2024-04-28 14:42:04 -0400 |
| commit | a573161abde810bcad561f60079f69d938497ce3 (patch) | |
| tree | 9e99804b76aab0a731bcfba49845edffc4ef9cac /src/checker.cpp | |
| parent | a37826e646c4c88974fad9a9ff1749e55dc7f52f (diff) | |
Allow `@(init)` procs to be `@(disabled)`
Diffstat (limited to 'src/checker.cpp')
| -rw-r--r-- | src/checker.cpp | 5 |
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); |