#error: root struct of file 'subfolder.sub' has no member named 'name'
1 messages · Page 1 of 1 (latest)
why i cannot access file-container' s field?
because it's a field of a struct
other zig libraries have fields
const root = struct {
name: [:0]const u8 = "Hello from src/root.zig",
};
test "example" {
print(root.name); // ← you can't do this because you're accessing the field on the type
const myroot: root = .{};
print(myroot.name); // ← this works
}