master
1const init: u32 = 1;
2fn rt() u32 {
3 return 3;
4}
5
6var tuple_val = .{init};
7export fn tuple_field() void {
8 tuple_val[0] = rt();
9}
10
11var struct_val = .{ .x = init };
12export fn struct_field() void {
13 struct_val.x = rt();
14}
15
16// error
17//
18// :8:14: error: cannot store runtime value in compile time variable
19// :13:15: error: cannot store runtime value in compile time variable