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.
This commit is contained in:
agra
2026-05-30 01:21:34 +03:00
parent 76e0e97bfa
commit 9e38bb924a

View File

@@ -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 `$<name>` 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;