mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
parent
df4853a627
commit
6734d2117e
@ -465,3 +465,15 @@ test "coerce anon tuple to tuple" {
|
||||
try expectEqual(x, s[0]);
|
||||
try expectEqual(y, s[1]);
|
||||
}
|
||||
|
||||
test "empty tuple type" {
|
||||
const S = @Type(.{ .Struct = .{
|
||||
.layout = .Auto,
|
||||
.fields = &.{},
|
||||
.decls = &.{},
|
||||
.is_tuple = true,
|
||||
} });
|
||||
|
||||
const s: S = .{};
|
||||
try expect(s.len == 0);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user