Closed
Description
foo as bool
should result in an i1, not an i8. This can lead to various unexpected or hard to debug behavior. See:
rusti> 3 as bool as u8
3
rusti> (3 as bool)
true
rusti> (2 as bool)
true
rusti> std::bool::xor(true, true)
false
rusti> std::bool::xor((3 as bool), (2 as bool))
true
rusti> 0xffff as bool as u8
255
rusti> 0xff00 as bool
false
Metadata
Metadata
Assignees
Labels
No labels