zig/test/behavior/bugs/7003.zig
2021-06-21 17:03:03 -07:00

10 lines
284 B
Zig

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;
}