From 87b514890cb2fd3524e6bd9e5e7e12e3a248ca91 Mon Sep 17 00:00:00 2001 From: Brody Date: Mon, 3 Aug 2026 22:07:18 +1000 Subject: [PATCH] fix: instantiated procs keep their own scope Was this check here for a reason? Investigate --- src/check_expr.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 8256d9474..609173981 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -466,9 +466,7 @@ gb_internal bool find_or_generate_polymorphic_procedure(CheckerContext *old_c, E scope->flags |= ScopeFlag_Proc; nctx.scope = scope; nctx.allow_polymorphic_types = true; - if (nctx.polymorphic_scope == nullptr) { - nctx.polymorphic_scope = scope; - } + nctx.polymorphic_scope = scope; auto *pt = &src->Proc;