Open joelreymont opened 6 days ago
Folks here tried to reduce the code
const std = @import("std");
pub fn main() void {
_ = &toValue(10);
}
fn toValue(comptime value: anytype) fn (anytype) @TypeOf(value) {
return struct {
fn toValue(_: anytype) @TypeOf(value) {
return value;
}
}.toValue;
}
and made the compiler run out of memory.
$ zig build run
run
└─ run t
└─ zig build-exe t Debug native failure
error: error: OutOfMemory
error: the following command exited with error code 1:
/home/joe/.local/bin/zig build-exe -ODebug -Mroot=/home/joe/dev/test/t/src/main.zig --cache-dir /home/joe/dev/test/t/.zig-cache --global-cache-dir /home/joe/.cache/zig --name t --zig-lib-dir /home/joe/.local/lib/zig/ --listen=-
Build Summary: 2/7 steps succeeded; 1 failed
run transitive failure
└─ run t transitive failure
├─ zig build-exe t Debug native failure
└─ install transitive failure
└─ install t transitive failure
└─ zig build-exe t Debug native (reused)
error: the following build command failed with exit code 1:
/home/joe/dev/test/t/.zig-cache/o/d6ab6ac316016b1fb96986f35985df59/build /home/joe/.local/bin/zig /home/joe/.local/lib/zig /home/joe/dev/test/t /home/joe/dev/test/t/.zig-cache /home/joe/.cache/zig --seed 0xcf2b4b4d -Zfb3c70f1c60d0fa9 run
Possibly a duplicate of #21099?
Zig Version
0.14.0-dev.2052+6a364b4a5
Steps to Reproduce and Observed Behavior
Trying to compile this
gives me this error
Expected Behavior
Build should finish.