Skip to content

Commit

Permalink
add test case to cover already-solved bug
Browse files Browse the repository at this point in the history
closes #2401
  • Loading branch information
andrewrk committed Jan 5, 2020
1 parent 6ff70d3 commit c30106c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/stage1/behavior/union.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit c30106c

Please sign in to comment.