Slice range notation format

If you use something like this:

fn calc(a: u6, b: u6) void {
    const l:u7, const u:u7 = if (a < b) .{a, b} else .{b, a};
    for (l..u + 1) |v| {
    }
}

There is no overflow danger because currently in zig v is a usize.
But I would also like if we could have typed smaller indices like this:

1 Like