#Zon Decl Literal

1 messages · Page 1 of 1 (latest)

viral steeple
#

Can you use a decl literal in a .zon file?
If i have

const Person = struct {
  pub const Bob: Person = .{.name="Bob"};
  name: []const u8,
};
const Car = struct {
  owner: Person,
};

can I reference Bob from a zon?

.{
  .owner = .Bob,
}
indigo bobcat
keen nest
#

would appear that decl literals are not interpreted as such when initialising from a zon literal

viral steeple