082_anonymous_structs3.patch 481 B

1234567891011121314151617181920
  1. 85c85
  2. < const fields = ???;
  3. ---
  4. > const fields = @typeInfo(@TypeOf(tuple)).Struct.fields;
  5. 92c92
  6. < for (fields) |field| {
  7. ---
  8. > inline for (fields) |field| {
  9. 116c116
  10. < // @field(foo, "x"); // returns the value at foo.x
  11. ---
  12. > // @field(foo, "x");
  13. 120,122c120,122
  14. < field.???,
  15. < field.???,
  16. < ???,
  17. ---
  18. > field.name,
  19. > field.field_type,
  20. > @field(tuple, field.name),