cbe: fix incomplete array element types

Can't imagine this working, but might as well try until I remember why.

Closes #21439
This commit is contained in:
Jacob Young 2025-02-09 08:48:10 -05:00 committed by Andrew Kelley
parent 74fbcd22e6
commit 8d078f1ba2

View file

@ -728,6 +728,14 @@ pub const Kind = enum {
.global => .global,
};
}
pub fn asComplete(kind: Kind) Kind {
return switch (kind) {
.forward, .complete => .complete,
.forward_parameter, .parameter => .parameter,
.global => .global,
};
}
};
pub const Info = union(enum) {
@ -1887,7 +1895,7 @@ pub const Pool = struct {
elem_type,
pt,
mod,
kind.noParameter(),
kind.noParameter().asComplete(),
);
if (elem_ctype.index == .void) return .void;
const array_ctype = try pool.getArray(allocator, .{
@ -1913,7 +1921,7 @@ pub const Pool = struct {
elem_type,
pt,
mod,
kind.noParameter(),
kind.noParameter().asComplete(),
);
if (elem_ctype.index == .void) return .void;
const vector_ctype = try pool.getVector(allocator, .{