Commit c30106c906

Andrew Kelley <andrew@ziglang.org>
2020-01-05 23:42:03
add test case to cover already-solved bug
closes #2401
1 parent 6ff70d3
Changed files (1)
test
stage1
behavior
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);
+}