From 5ff9d692314e9d319e85780d9281878ea5fc6107 Mon Sep 17 00:00:00 2001 From: Dave Gauer Date: Sun, 9 May 2021 18:58:56 -0400 Subject: add ex082 anon structs 3 --- patches/patches/082_anonymous_structs3.patch | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 patches/patches/082_anonymous_structs3.patch (limited to 'patches') diff --git a/patches/patches/082_anonymous_structs3.patch b/patches/patches/082_anonymous_structs3.patch new file mode 100644 index 0000000..807e2f9 --- /dev/null +++ b/patches/patches/082_anonymous_structs3.patch @@ -0,0 +1,20 @@ +85c85 +< const fields = ???; +--- +> const fields = @typeInfo(@TypeOf(tuple)).Struct.fields; +92c92 +< for (fields) |field| { +--- +> inline for (fields) |field| { +116c116 +< // @field(foo, "x"); // returns the value at foo.x +--- +> // @field(foo, "x"); +120,122c120,122 +< field.???, +< field.???, +< ???, +--- +> field.name, +> field.field_type, +> @field(tuple, field.name), -- cgit v1.2.3-ZIG