blob: 3149a468104c12f617b2a19043e19f959d0e4fcb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
const U = union {
comptime a: u32 = 1,
};
const E = enum {
comptime a = 1,
};
const P = packed struct {
comptime a: u32 = 1,
};
const X = extern struct {
comptime a: u32 = 1,
};
// error
// backend=stage2
// target=native
//
// :2:5: error: union fields cannot be marked comptime
// :5:5: error: enum fields cannot be marked comptime
// :8:5: error: packed struct fields cannot be marked comptime
// :11:5: error: extern struct fields cannot be marked comptime
|