aboutsummaryrefslogtreecommitdiff
path: root/src/check_type.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2020-05-14 13:44:28 +0100
committergingerBill <bill@gingerbill.org>2020-05-14 13:44:28 +0100
commite0a242e9a1f792752213e41fcc3603565d3d8986 (patch)
treecb896003c0eb472240500f2caa6e804d977c360f /src/check_type.cpp
parentcd4403be0c2656f0d4ba74a96eccaf905beae2ff (diff)
Enforce explicit context definition for procedure calls
Diffstat (limited to 'src/check_type.cpp')
-rw-r--r--src/check_type.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp
index 8d8bae1a7..8aa24a752 100644
--- a/src/check_type.cpp
+++ b/src/check_type.cpp
@@ -2512,6 +2512,8 @@ bool check_procedure_type(CheckerContext *ctx, Type *type, Ast *proc_type_node,
GB_ASSERT(cc > 0);
if (cc == ProcCC_Odin) {
c->scope->flags |= ScopeFlag_ContextDefined;
+ } else {
+ c->scope->flags &= ~ScopeFlag_ContextDefined;
}
bool variadic = false;