#Get type of an anonymous inner struct

1 messages · Page 1 of 1 (latest)

wooden turret
#

Suppose I have something like this:

const Foo = struct {
  bar: struct {
    x: i32,
    y: i32,
  };
};

and I would like to pass the inner type of Foo.bar (without an instance) to a function that takes in a (comptime) type.

hot sage
#

@FieldType(Foo, "bar")