aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/bugs/7003.zig
blob: 3568f36d2bb37a3a80e07f1295057639b53b3f61 (plain)
1
2
3
4
5
6
7
8
9
test "@Type should resolve its children types" {
    const sparse = enum(u2) { a, b, c };
    const dense = enum(u2) { a, b, c, d };

    comptime var sparse_info = @typeInfo(anyerror!sparse);
    sparse_info.ErrorUnion.payload = dense;
    const B = @Type(sparse_info);
    _ = B;
}