zig/test/behavior/bugs/7003.zig
Andrew Kelley 4307436b99 move behavior tests from test/stage1/ to test/
And fix test cases to make them pass. This is in preparation for
starting to pass behavior tests with self-hosted.
2021-04-29 15:54:04 -07:00

9 lines
273 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);
}