zls icon indicating copy to clipboard operation
zls copied to clipboard

integer overflow not highlighted as an error

Open ngc6302h opened this issue 1 year ago • 0 comments

integer overflow not highlighted as an error

The following code should have a hover error over the assignment to 500, as 500 would overflow the 8 bit integer. zls, however, doesn't say anything about this.

const std = @import("std");

pub fn main() u8 {
    const k : u8 = 500;
    return k;
}

ngc6302h avatar Apr 16 '24 20:04 ngc6302h