aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/bugs/11181.zig
blob: 8abccc40c3a6130c315cd3442d3b01cfacd334c7 (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
const builtin = @import("builtin");

test "const inferred array of slices" {
    const T = struct { v: bool };

    const decls = [_][]const T{
        &[_]T{
            .{ .v = false },
        },
    };
    _ = decls;
}

test "var inferred array of slices" {
    if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO

    const T = struct { v: bool };

    var decls = [_][]const T{
        &[_]T{
            .{ .v = false },
        },
    };
    _ = decls;
}