aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--exercises/062_loop_expressions.zig4
-rw-r--r--exercises/064_builtins.zig2
-rw-r--r--patches/patches/062_loop_expressions.patch2
-rw-r--r--patches/patches/064_builtins.patch4
4 files changed, 7 insertions, 5 deletions
diff --git a/exercises/062_loop_expressions.zig b/exercises/062_loop_expressions.zig
index 8161b2e..a40b622 100644
--- a/exercises/062_loop_expressions.zig
+++ b/exercises/062_loop_expressions.zig
@@ -24,6 +24,10 @@
// is probably not what you want. So consider the else clause
// essential when using loops as expressions.
//
+// const four: u8 = while (true) {
+// break 4;
+// }; // <-- ERROR! Implicit 'else void' here!
+//
// With that in mind, see if you can fix the problem with this
// program.
//
diff --git a/exercises/064_builtins.zig b/exercises/064_builtins.zig
index a9761c2..735ff9d 100644
--- a/exercises/064_builtins.zig
+++ b/exercises/064_builtins.zig
@@ -70,5 +70,5 @@ pub fn main() void {
// this builtin to reverse the bits of a u8 integer.
const input: u8 = 0b11110000;
const tupni: u8 = @bitReverse(input);
- print("{b:0>8} backwards is {b:0>8}.\n", .{input});
+ print("{b:0>8} backwards is {b:0>8}.\n", .{input, tupni});
}
diff --git a/patches/patches/062_loop_expressions.patch b/patches/patches/062_loop_expressions.patch
index 85b1fd2..8b33607 100644
--- a/patches/patches/062_loop_expressions.patch
+++ b/patches/patches/062_loop_expressions.patch
@@ -1,4 +1,4 @@
-46c46
+50c50
< };
---
> } else null;
diff --git a/patches/patches/064_builtins.patch b/patches/patches/064_builtins.patch
index cdba367..644128b 100644
--- a/patches/patches/064_builtins.patch
+++ b/patches/patches/064_builtins.patch
@@ -1,6 +1,4 @@
-72,73c72,73
+72c72
< const tupni: u8 = @bitReverse(input);
-< print("{b:0>8} backwards is {b:0>8}.\n", .{input});
---
> const tupni: u8 = @bitReverse(u8, input);
-> print("{b:0>8} backwards is {b:0>8}.\n", .{input, tupni});