aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/bugs/12786.zig
blob: 958b1ebf86176c17327e0808659589beeb127547 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
const std = @import("std");

fn NamespacedGlobals(comptime modules: anytype) type {
    return @Type(.{
        .Struct = .{
            .layout = .Auto,
            .is_tuple = false,
            .fields = &.{
                .{
                    .name = "globals",
                    .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 {},
        },
    });
}