Closed
Description
Code:
const std = @import("std");
test "" {
const T = struct {
fn func() void {}
};
inline for (.{ 0, 1 }) |val| {
@call(.{}, T.func, .{});
}
}
Error:
./zigtest.zig:8:16: error: cannot assign to constant
@call(.{}, T.func, .{});
^
./zigtest.zig:3:9: note: referenced here
test "" {
^
./zigtest.zig:8:16: error: cannot assign to constant
@call(.{}, T.func, .{});
^
Error does not occur if only run once (i.e. inline for (.{ 0 }) ...
Metadata
Metadata
Assignees
Labels
No labels