diff --git a/test/stage1/behavior/union.zig b/test/stage1/behavior/union.zig index d831b51b08c1..a977e318533f 100644 --- a/test/stage1/behavior/union.zig +++ b/test/stage1/behavior/union.zig @@ -611,3 +611,12 @@ test "function call result coerces from tagged union to the tag" { S.doTheTest(); comptime S.doTheTest(); } + +test "0-sized extern union definition" { + const U = extern union { + a: void, + const f = 1; + }; + + expect(U.f == 1); +}