From 7a16ed09ac1700a61c6948951d56961f81c1ff77 Mon Sep 17 00:00:00 2001 From: Chris Boesch Date: Sun, 11 Jun 2023 23:41:42 +0200 Subject: [PATCH 1/2] Fixed missing comptime. --- exercises/068_comptime3.zig | 2 +- patches/patches/068_comptime3.patch | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/exercises/068_comptime3.zig b/exercises/068_comptime3.zig index 848d7d2..15b8997 100644 --- a/exercises/068_comptime3.zig +++ b/exercises/068_comptime3.zig @@ -28,7 +28,7 @@ const Schooner = struct { mainmast_height: u32 = 95, fn scaleMe(self: *Schooner, comptime scale: u32) void { - var my_scale = scale; + comptime var my_scale = scale; // We did something neat here: we've anticipated the // possibility of accidentally attempting to create a diff --git a/patches/patches/068_comptime3.patch b/patches/patches/068_comptime3.patch index 985f0e6..d05b30b 100644 --- a/patches/patches/068_comptime3.patch +++ b/patches/patches/068_comptime3.patch @@ -6,3 +6,7 @@ < var scale: u32 = undefined; --- > comptime var scale: u32 = undefined; +76c76 +< minnow.scaleMe(scale); +--- +> minnow.scaleMe(32); From 2815574e35feca0623a9622cf4e2b481dc400aad Mon Sep 17 00:00:00 2001 From: Chris Boesch Date: Sun, 11 Jun 2023 23:45:50 +0200 Subject: [PATCH 2/2] Removed debug info. --- patches/patches/068_comptime3.patch | 4 ---- 1 file changed, 4 deletions(-) diff --git a/patches/patches/068_comptime3.patch b/patches/patches/068_comptime3.patch index d05b30b..985f0e6 100644 --- a/patches/patches/068_comptime3.patch +++ b/patches/patches/068_comptime3.patch @@ -6,7 +6,3 @@ < var scale: u32 = undefined; --- > comptime var scale: u32 = undefined; -76c76 -< minnow.scaleMe(scale); ---- -> minnow.scaleMe(32);