| author | |
| committer | |
| log | c30106c90665079f525129e344cc1c13e4db162b |
| tree | dddc37cbbb7aa5ebf7e456114d4532d2a82915c4 |
| parent | 6ff70d3c31607abfab7b0641bb903859972a6a8b |
| signature |
closes #24011 files changed, 9 insertions(+), 0 deletions(-)
test/stage1/behavior/union.zig+9| ... | @@ -611,3 +611,12 @@ test "function call result coerces from tagged union to the tag" { | ... | @@ -611,3 +611,12 @@ test "function call result coerces from tagged union to the tag" { |
| 611 | S.doTheTest(); | 611 | S.doTheTest(); |
| 612 | comptime S.doTheTest(); | 612 | comptime S.doTheTest(); |
| 613 | } | 613 | } |
| 614 | |||
| 615 | test "0-sized extern union definition" { | ||
| 616 | const U = extern union { | ||
| 617 | a: void, | ||
| 618 | const f = 1; | ||
| 619 | }; | ||
| 620 | |||
| 621 | expect(U.f == 1); | ||
| 622 | } |