aboutsummaryrefslogtreecommitdiff
path: root/src/checker.cpp
diff options
context:
space:
mode:
authorFeoramund <161657516+Feoramund@users.noreply.github.com>2025-05-19 20:29:01 -0400
committerFeoramund <161657516+Feoramund@users.noreply.github.com>2025-05-19 20:50:43 -0400
commitb0185288336f148b71240514b9fa61deeb31c8b4 (patch)
treef66a453346749abd267a961086b04ea28a63063f /src/checker.cpp
parent91d6e5372caea481b7298c2be956ff204bdba44a (diff)
Do not call disabled deferred procedures
Diffstat (limited to 'src/checker.cpp')
-rw-r--r--src/checker.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/checker.cpp b/src/checker.cpp
index 909ee705b..aaa815365 100644
--- a/src/checker.cpp
+++ b/src/checker.cpp
@@ -6325,6 +6325,12 @@ gb_internal void check_deferred_procedures(Checker *c) {
continue;
}
+ if (dst->flags & EntityFlag_Disabled) {
+ // Prevent procedures that have been disabled from acting as deferrals.
+ src->Procedure.deferred_procedure = {};
+ continue;
+ }
+
GB_ASSERT(is_type_proc(src->type));
GB_ASSERT(is_type_proc(dst->type));
Type *src_params = base_type(src->type)->Proc.params;