Meg's Mirrors
zig
about
heads
tags
log
tree
search
Search
zig
test
cases
compile_errors
int_to_float_coercion_loses_precision.zig
pretty
plain
permalink
blame
history
•
9 lines
•
176 B
1
export fn foo() void {
2
const int: u16 = 65535;
3
const float: f16 = int;
4
_ = float;
5
}
6
7
// error
8
//
9
// :3:24: error: type 'f16' cannot represent integer value '65535'