diff --git a/src/ir/lower.zig b/src/ir/lower.zig index 671cd76..b1e8d6a 100644 --- a/src/ir/lower.zig +++ b/src/ir/lower.zig @@ -10793,8 +10793,9 @@ pub const Lowering = struct { // i-th element type of the active pack binding (step 3 of the // variadic heterogeneous type packs feature). Unblocks parametric // trampoline bodies (`(*void, $args[0]) -> $args[1]`) in stdlib's - // generic Into(Block) impl. OOB indices emit a diagnostic; no - // binding → bail with a diagnostic-friendly placeholder. + // generic Into(Block) impl. OOB indices / a missing binding emit a + // diagnostic and return the `.unresolved` sentinel — never a plausible + // `.s64`, which would silently fabricate an 8-byte int. if (node.data == .pack_index_type_expr) { const pi = node.data.pack_index_type_expr; if (self.pack_arg_types) |pat| { @@ -10806,7 +10807,7 @@ pub const Lowering = struct { if (arg_tys.len == 1) @as([]const u8, "") else @as([]const u8, "s"), }); } - return .s64; + return .unresolved; } } if (self.diagnostics) |diags| { @@ -10814,7 +10815,7 @@ pub const Lowering = struct { pi.pack_name, pi.index, }); } - return .s64; + return .unresolved; } // `*Self` substitution inside foreign-class member declarations // — both foreign and sx-defined — resolves to the class's own