From d343f54d6d35d304ac16f4335f2d5c5d235597d9 Mon Sep 17 00:00:00 2001 From: Feoramund <161657516+Feoramund@users.noreply.github.com> Date: Mon, 23 Jun 2025 09:03:50 -0400 Subject: Fix spurious failure to compile procedures marked `@instrumentation_enter` The type `Source_Code_Location` may not be available yet, which causes the compiler to not recognize the procedure type correctly. --- src/check_decl.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/check_decl.cpp') diff --git a/src/check_decl.cpp b/src/check_decl.cpp index c696fc4c1..7458f23d5 100644 --- a/src/check_decl.cpp +++ b/src/check_decl.cpp @@ -1334,6 +1334,7 @@ gb_internal void check_proc_decl(CheckerContext *ctx, Entity *e, DeclInfo *d) { has_instrumentation = false; e->flags |= EntityFlag_Require; } else if (ac.instrumentation_enter) { + init_core_source_code_location(ctx->checker); if (!is_valid_instrumentation_call(e->type)) { init_core_source_code_location(ctx->checker); gbString s = type_to_string(e->type); -- cgit v1.2.3