| 1 | const init: u32 = 1; |
| 2 | fn rt() u32 { |
| 3 | return 3; |
| 4 | } |
| 5 | |
| 6 | var tuple_val = .{init}; |
| 7 | export fn tuple_field() void { |
| 8 | tuple_val[0] = rt(); |
| 9 | } |
| 10 | |
| 11 | var struct_val = .{ .x = init }; |
| 12 | export 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 |