aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/tuple_declarations.zig
blob: 79074d538ff116763972fdc61e0ad90542e5dd6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
const E = enum {
    *u32,
};
const U = union {
    *u32,
};
const S = struct {
    a: u32,
    *u32,
};
const T = struct {
    u32,
    []const u8,

    const a = 1;
};

// error
//
// :2:5: error: enum field missing name
// :5:5: error: union field missing name
// :8:5: error: tuple field has a name
// :15:5: error: tuple declarations cannot contain declarations
// :12:5: note: tuple field here