From 9e38bb924aeba731a081ac125f201cb90f967218 Mon Sep 17 00:00:00 2001 From: agra Date: Sat, 30 May 2026 01:21:34 +0300 Subject: [PATCH] ir: resolveTypeArg failure paths return .unresolved, not .void The three post-diagnostic failure returns in resolveTypeArg (pack-index OOB, no active pack binding, unresolved type name) returned .void as a sentinel. Per the CLAUDE.md rule (.void is unacceptable for a failed type lookup -- it conflates with the real void type), use the dedicated .unresolved sentinel. They follow addFmt(.err) so compilation aborts before codegen; behavior is unchanged, the sentinel is now correct. 236 + unit green. --- src/ir/lower.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ir/lower.zig b/src/ir/lower.zig index ee22296..5aa5534 100644 --- a/src/ir/lower.zig +++ b/src/ir/lower.zig @@ -9815,7 +9815,7 @@ pub const Lowering = struct { if (arg_tys.len == 1) @as([]const u8, "") else @as([]const u8, "s"), }); } - return .void; + return .unresolved; } } if (self.diagnostics) |diags| { @@ -9823,7 +9823,7 @@ pub const Lowering = struct { pi.pack_name, pi.index, }); } - return .void; + return .unresolved; } // Bare `$` in a type-arg position. Single-type generic // bindings (`$R: Type` in `Closure(..$args) -> $R`) live in @@ -9849,7 +9849,7 @@ pub const Lowering = struct { if (self.diagnostics) |diags| { diags.addFmt(.err, node.span, "unresolved type: '{s}'", .{id.name}); } - return .void; + return .unresolved; }, .type_expr => |te| { if (self.type_alias_map.get(te.name)) |alias_ty| return alias_ty;