Zig Version
0.11.0-dev.3206+b9d2e0e30
Steps to Reproduce and Observed Behavior
const std = @import("std");
const a = 12;
const b = 32;
pub fn main() void {
const x = @max(std.math.maxInt(u8), @max(a, b));
_ = x;
}
output:
src/a.zig:7:35: error: type 'u6' cannot represent integer value '255'
const x = @max(std.math.maxInt(u8), @max(a, b));
~~~~~~~~~~~~~~~^~~~
Expected Behavior
x should be @as(comptime_int, 255)