From e0a242e9a1f792752213e41fcc3603565d3d8986 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Thu, 14 May 2020 13:44:28 +0100 Subject: Enforce explicit context definition for procedure calls --- src/check_type.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/check_type.cpp') 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; -- cgit v1.2.3