From 6f3cdcf0183efae4e3915e56a7257084ff8d0e4a Mon Sep 17 00:00:00 2001
From: "Yevhen Babiichuk (DustDFG)" <dfgdust@gmail.com>
Date: Thu, 13 Mar 2025 20:49:41 +0200
Subject: [PATCH] Update type info for StructField type in 082

Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com>
---
 README.md                                    | 1 +
 exercises/082_anonymous_structs3.zig         | 6 ++++--
 patches/patches/082_anonymous_structs3.patch | 6 +++---
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index 63b96fe..2838209 100644
--- a/README.md
+++ b/README.md
@@ -233,6 +233,7 @@ Zig Core Language
 * [X] Interfaces
 * [X] Bit manipulation
 * [X] Working with C
+* [ ] Opaque types (anyopaque)
 * [X] Threading
 * [x] Labeled switch
 * [x] Vector operations (SIMD)
diff --git a/exercises/082_anonymous_structs3.zig b/exercises/082_anonymous_structs3.zig
index 573d0bb..469cd66 100644
--- a/exercises/082_anonymous_structs3.zig
+++ b/exercises/082_anonymous_structs3.zig
@@ -95,13 +95,15 @@ fn printTuple(tuple: anytype) void {
         //     Each 'field' in this loop is one of these:
         //
         //         pub const StructField = struct {
-        //             name: []const u8,
+        //             name: [:0]const u8,
         //             type: type,
-        //             default_value: anytype,
+        //             default_value_ptr: ?*const anyopaque,
         //             is_comptime: bool,
         //             alignment: comptime_int,
         //         };
         //
+        //     Note we will learn about 'anyopaque' type later
+        //
         //     You'll need this builtin:
         //
         //         @field(lhs: anytype, comptime field_name: []const u8)
diff --git a/patches/patches/082_anonymous_structs3.patch b/patches/patches/082_anonymous_structs3.patch
index b918011..0f71a94 100644
--- a/patches/patches/082_anonymous_structs3.patch
+++ b/patches/patches/082_anonymous_structs3.patch
@@ -1,5 +1,5 @@
---- exercises/082_anonymous_structs3.zig	2024-09-07 19:13:58.210327580 +0200
-+++ answers/082_anonymous_structs3.zig	2024-09-07 19:21:20.972733477 +0200
+--- exercises/082_anonymous_structs3.zig	2025-03-14 16:41:17.892873287 +0200
++++ answers/082_anonymous_structs3.zig	2025-03-14 16:40:56.043829543 +0200
 @@ -82,14 +82,14 @@
      //         @typeInfo(Circle).@"struct".fields
      //
@@ -17,7 +17,7 @@
          // 3. Print the field's name, type, and value.
          //
          //     Each 'field' in this loop is one of these:
-@@ -117,9 +117,9 @@
+@@ -119,9 +119,9 @@
          //
          // The first field should print as: "0"(bool):true
          print("\"{s}\"({any}):{any} ", .{