mirror of
https://github.com/ziglang/zig.git
synced 2025-12-14 18:23:12 +00:00
29 lines
698 B
Zig
29 lines
698 B
Zig
const std = @import("std");
|
|
|
|
fn NamespacedGlobals(comptime modules: anytype) type {
|
|
return @Type(.{
|
|
.Struct = .{
|
|
.layout = .Auto,
|
|
.is_tuple = false,
|
|
.fields = &.{
|
|
.{
|
|
.name = "globals",
|
|
.field_type = modules.mach.globals,
|
|
.default_value = null,
|
|
.is_comptime = false,
|
|
.alignment = @alignOf(modules.mach.globals),
|
|
},
|
|
},
|
|
.decls = &[_]std.builtin.Type.Declaration{},
|
|
},
|
|
});
|
|
}
|
|
|
|
test {
|
|
_ = NamespacedGlobals(.{
|
|
.mach = .{
|
|
.globals = struct {},
|
|
},
|
|
});
|
|
}
|