const compFn = switch (direction) {
.Right => Position.generateCompFn("x", .Less),
.Down => Position.generateCompFn("y", .Less),
.Left => Position.generateCompFn("x", .Greater),
.Up => Position.generateCompFn("y", .Greater),
};
direction is runtime, all results can be comptime -calculated.
but Zig doesn't want me to:
value with comptime-only type 'fn (void, main.Position, main.Position) bool' depends on runtime control flow
why?