aboutsummaryrefslogtreecommitdiff
path: root/doc/langref/runtime_out_of_bounds_float_to_integer_cast.zig
blob: c3c6cd8404728d98717e3c81401059aa59963c09 (plain)
1
2
3
4
5
6
7
8
pub fn main() void {
    var float: f32 = 4294967296; // runtime-known
    _ = &float;
    const int: i32 = @intFromFloat(float);
    _ = int;
}

// exe=fail