| author | |
| committer | |
| log | 6734d2117e3520c1ef011609d0e2b2dd131a80aa |
| tree | b2eaef46962a80ea8ebe4f17c0850bbb166b15b7 |
| parent | df4853a6271b7963d77cafda7d6727274c6cbdaa |
Closes #164121 files changed, 12 insertions(+), 0 deletions(-)
test/behavior/tuple.zig+12| ... | ... | @@ -465,3 +465,15 @@ test "coerce anon tuple to tuple" { |
| 465 | 465 | try expectEqual(x, s[0]); |
| 466 | 466 | try expectEqual(y, s[1]); |
| 467 | 467 | } |
| 468 | ||
| 469 | test "empty tuple type" { | |
| 470 | const S = @Type(.{ .Struct = .{ | |
| 471 | .layout = .Auto, | |
| 472 | .fields = &.{}, | |
| 473 | .decls = &.{}, | |
| 474 | .is_tuple = true, | |
| 475 | } }); | |
| 476 | ||
| 477 | const s: S = .{}; | |
| 478 | try expect(s.len == 0); | |
| 479 | } |