From 2e981d408fcf88dea67211a911c9c35ea3645d7c Mon Sep 17 00:00:00 2001 From: Paul Ebose Date: Fri, 27 Feb 2026 03:48:11 +0100 Subject: [PATCH] add hint that @field() works differently on types and values --- exercises/082_anonymous_structs3.zig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/exercises/082_anonymous_structs3.zig b/exercises/082_anonymous_structs3.zig index 469cd66..c13774f 100644 --- a/exercises/082_anonymous_structs3.zig +++ b/exercises/082_anonymous_structs3.zig @@ -118,6 +118,10 @@ fn printTuple(tuple: anytype) void { // @field(foo, "x"); // returns the value at foo.x // // The first field should print as: "0"(bool):true + // + // Hint: Be careful! If your 'lhs' is a type, @field() looks + // for declarations. If it's a value, it looks for data. + // print("\"{s}\"({any}):{any} ", .{ field.???, field.???,