my ziglings
0

Configure Feed

Select the types of activity you want to include in your feed.

add hint that @field() works differently on types and values

Paul Ebose (Feb 27, 2026, 3:48 AM +0100) 2e981d40 3ecaa342

+4
+4
exercises/082_anonymous_structs3.zig
··· 118 118 // @field(foo, "x"); // returns the value at foo.x 119 119 // 120 120 // The first field should print as: "0"(bool):true 121 + // 122 + // Hint: Be careful! If your 'lhs' is a type, @field() looks 123 + // for declarations. If it's a value, it looks for data. 124 + // 121 125 print("\"{s}\"({any}):{any} ", .{ 122 126 field.???, 123 127 field.???,