diff options
| author | Dave Gauer <dave@ratfactor.com> | 2021-05-09 18:58:56 -0400 |
|---|---|---|
| committer | Dave Gauer <dave@ratfactor.com> | 2021-05-09 18:58:56 -0400 |
| commit | c43e5480c6d3e084a6e375098564ae4edd900706 (patch) | |
| tree | c823a22a4d181c3aff8c2c4ba11d089cad5cec69 /patches | |
| parent | c0bbbee1764513e3c31e586555e76fda2c3408bc (diff) | |
add ex082 anon structs 3
Diffstat (limited to 'patches')
| -rw-r--r-- | patches/patches/082_anonymous_structs3.patch | 20 |
1 files changed, 20 insertions, 0 deletions
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), |
