| ... | @@ -465,3 +465,15 @@ test "coerce anon tuple to tuple" { | ... | @@ -465,3 +465,15 @@ test "coerce anon tuple to tuple" { |
| 465 | try expectEqual(x, s[0]); | 465 | try expectEqual(x, s[0]); |
| 466 | try expectEqual(y, s[1]); | 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 | } |