aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/alignment_of_enum_field_specified.zig
blob: 409a8e0f934bce1429e4de31a12d72910fa716ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// zig fmt: off
const Number = enum {
    a,
    b align(i32),
};
// zig fmt: on

export fn entry1() void {
    const x: Number = undefined;
    _ = x;
}

// error
// backend=stage2
// target=native
//
// :4:13: error: enum fields cannot be aligned