diff --git a/astgen.c b/astgen.c index 997e6d4707..eb6afddd36 100644 --- a/astgen.c +++ b/astgen.c @@ -7453,9 +7453,10 @@ static void fnDecl(AstGenCtx* ag, GenZir* gz, uint32_t* wip_decl_insts, } free(ret_body); - // break_inline returning func to declaration - // (AstGen.zig:4495). - makeBreakInline(&decl_gz, decl_inst, func_ref, AST_NODE_OFFSET_NONE); + // break_inline returning func to declaration (AstGen.zig:4495). + // nodeIndexToRelative(decl_node) = node - decl_gz.decl_node_index. + makeBreakInline( + &decl_gz, decl_inst, func_ref, (int32_t)node - (int32_t)proto_node); // setDeclaration (AstGen.zig:4208-4225). DeclFlagsId decl_id