mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
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:
parent
74fbcd22e6
commit
8d078f1ba2
@ -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, .{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user