From 3a782a96d5fdad216c45c6c6af06a8a85ff59340 Mon Sep 17 00:00:00 2001 From: Chris Boesch Date: Thu, 30 Apr 2026 19:30:27 +0200 Subject: fixed compileError printing --- exercises/074_comptime9.zig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'exercises') diff --git a/exercises/074_comptime9.zig b/exercises/074_comptime9.zig index 50894fd..1fc8e31 100644 --- a/exercises/074_comptime9.zig +++ b/exercises/074_comptime9.zig @@ -1,4 +1,5 @@ -const print = @import("std").debug.print; +const std = @import("std"); +const print = std.debug.print; // We're going to (ab)use the power of Zig to make animal hybrid creatures! // What do you think a GatorMouse would look like? Eek. @@ -58,7 +59,7 @@ fn makeCreature(comptime count: usize, comptime fmt: []const u8) [count]Animal { // other animals or is this an error? 'g' => ???, - else => @compileError("No animal starts with '" ++ char ++ "'!"), + else => @compileError(std.fmt.comptimePrint("No animal starts with '{c}'!", .{char})), }, .l => switch (char) { -- cgit v1.2.3