aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/bugs/11159.zig
blob: 352491fefc0404065debfa9c16b5c3fa0cbf50ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
const std = @import("std");
const builtin = @import("builtin");

test {
    const T = @TypeOf(.{ @as(i32, 0), @as(u32, 0) });
    var a: T = .{ 0, 0 };
    _ = a;
}

test {
    const S = struct {
        comptime x: i32 = 0,
        comptime y: u32 = 0,
    };
    var a: S = .{};
    _ = a;
    var b = S{};
    _ = b;
}