blob: cfcc53aa05c6d5a92a36330bae0285fe157f8a99 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
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
//
// :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
|