Zig Version
0.11.0-dev.1711+dc1f50e50
Steps to Reproduce and Observed Output
In continuation of #14700
const std = @import("std");
pub fn main() void {
var start: u32 = 1;
var end: u32 = 0;
for(start..end) |x| {
std.log.info("{}", .{x});
}
}
At the moment this produces an integer overflow error:
thread 2222 panic: integer overflow
/home/mint/Desktop/test.zig:6:6: 0x20b56c in main (test)
for(start..end) |x| {
^
Expected Output
I expect the error to be equivalent to the one we get for slicing:
thread 2319 panic: start index 1 is larger than end index 0
/home/mint/Desktop/test.zig:7:11: 0x20b60f in main (test)
for(slice[start..end]) |x| {
^
Zig Version
0.11.0-dev.1711+dc1f50e50
Steps to Reproduce and Observed Output
In continuation of #14700
At the moment this produces an integer overflow error:
Expected Output
I expect the error to be equivalent to the one we get for slicing: