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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user