| 1 | fn comptimeStruct(comptime _: anytype) void {} |
| 2 | fn bar() u8 { |
| 3 | return 123; |
| 4 | } |
| 5 | export fn entry() void { |
| 6 | const y = bar(); |
| 7 | comptimeStruct(.{ .foo = y }); |
| 8 | } |
| 9 | |
| 10 | // error |
| 11 | // |
| 12 | // :7:21: error: unable to resolve comptime value |
| 13 | // :7:21: note: argument to comptime parameter must be comptime-known |
| 14 | // :1:19: note: parameter declared comptime here |