master
1const S = struct {
2 comptime_field: comptime_int = 2,
3 normal_ptr: *u32,
4};
5
6export fn a() void {
7 var value: u32 = 3;
8 const comptimeStruct = S{
9 .normal_ptr = &value,
10 };
11 _ = comptimeStruct;
12}
13
14// error
15//
16// :9:10: error: unable to resolve comptime value
17// :9:10: note: initializer of comptime-only struct 'tmp.S' must be comptime-known
18// :2:21: note: struct requires comptime because of this field