exercises/patches/patches/067_comptime2.patch
2025-12-07 22:53:34 +01:00

12 lines
404 B
Diff

--- exercises/067_comptime2.zig 2025-12-07 22:51:24.396031248 +0100
+++ answers/067_comptime2.zig 2025-12-07 22:50:18.721616293 +0100
@@ -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 = .{'A'} ** count;