aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/declaration_between_fields.zig
blob: bb5b5201aa98ef5732d298c4afa4214f3e16cd2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
const S = struct {
    const foo = 2;
    const bar = 2;
    const baz = 2;
    a: struct {
        a: u32,
        b: u32,
    },
    const foo1 = 2;
    const bar1 = 2;
    const baz1 = 2;
    b: usize,
};
comptime {
    _ = S;
}

// error
//
// :9:5: error: declarations are not allowed between container fields
// :5:5: note: field before declarations here
// :12:5: note: field after declarations here