zig/test/cases/bugs/394.zig
Andrew Kelley a35b366eb6 [breaking] delete ptr deref prefix op
start using zig-fmt-pointer-reform branch build of zig fmt
to fix code to use the new syntax

all of test/cases/* are processed, but there are more left
to be done - all the std lib used by the behavior tests
2018-04-30 20:35:54 -04:00

21 lines
278 B
Zig

const E = union(enum) {
A: [9]u8,
B: u64,
};
const S = struct {
x: u8,
y: E,
};
const assert = @import("std").debug.assert;
test "bug 394 fixed" {
const x = S {
.x = 3,
.y = E {
.B = 1,
},
};
assert(x.x == 3);
}