#Zon Decl Literal
1 messages · Page 1 of 1 (latest)
You mean like this?
const std = @import("std");
const zon = @import("bob.zon");
const Person = struct {
pub const Bob: Person = .{ .name = "Bob" };
name: []const u8,
};
const Car = struct {
owner: Person,
};
pub fn main() !void {
std.debug.print("{[name]s}\n", @field(Person, @tagName(zon.owner)));
}
would appear that decl literals are not interpreted as such when initialising from a zon literal
More like
Ford33.zon
.{
.owner = .Bob,
}