Files
ziglings/patches/patches/067_comptime2.patch
2026-05-04 17:15:30 +02:00

12 lines
400 B
Diff

--- exercises/067_comptime2.zig 2026-05-04 15:38:52.565144012 +0200
+++ answers/067_comptime2.zig 2026-05-04 15:37:20.257213463 +0200
@@ -36,7 +36,7 @@
// In this contrived example, we've decided to allocate some
// arrays using a variable count! But something's missing...
//
- var count = 0;
+ comptime var count = 0;
count += 1;
const a1: [count]u8 = @splat('A');