Selaa lähdekoodia

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.
Feoramund 2 kuukautta sitten
vanhempi
commit
d343f54d6d
1 muutettua tiedostoa jossa 1 lisäystä ja 0 poistoa
  1. 1 0
      src/check_decl.cpp

+ 1 - 0
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);