mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
stage2: fix comptime element load of undef array
This commit is contained in:
parent
273da9efd9
commit
b28b3f6f7b
@ -2336,6 +2336,8 @@ pub const Value = extern union {
|
||||
buffer: *ElemValueBuffer,
|
||||
) error{OutOfMemory}!Value {
|
||||
switch (val.tag()) {
|
||||
// This is the case of accessing an element of an undef array.
|
||||
.undef => return Value.undef,
|
||||
.empty_array => unreachable, // out of bounds array index
|
||||
.empty_struct_value => unreachable, // out of bounds array index
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user