zig/test/cases/compile_errors/non-comptime-parameter-used-as-array-size.zig
Eric Joldasov 50339f595a all: zig fmt and rename "@XToY" to "@YFromX"
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-06-19 12:34:42 -07:00

14 lines
305 B
Zig

export fn entry() void {
const llamas1 = makeLlamas(5);
const llamas2 = makeLlamas(5);
_ = llamas1;
_ = llamas2;
}
fn makeLlamas(count: usize) [count]u8 {}
// error
// target=native
//
// :8:30: error: unable to resolve comptime value
// :8:30: note: array length must be comptime-known