Sema: bad union field access safety

This commit is contained in:
Veikka Tuominen
2022-07-16 16:32:49 +03:00
parent 55fe34100f
commit ff7ec4efb5
15 changed files with 194 additions and 90 deletions

View File

@@ -998,6 +998,9 @@ test "tuple element initialized with fn call" {
}
test "struct with union field" {
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
const Value = struct {
ref: u32 = 2,
kind: union(enum) {