Closed
Description
fn main() {
let uint x = -1 as uint;
log x;
}
This testcase seems to show that negative numbers can be accepted as unsigned integers. Unsigned integers should only comprise of non-negative numbers.
(not sure if this is working as intended.)
On repository revision 5955e23 on Mac 10.6.5.
Output:
$ ./rustboot -L . -o 2out.out 2test.rs
$ ./2out.out
rt: ---
rt: a5ed:main:main: rust: -1 (0xffffffff)
Metadata
Metadata
Assignees
Labels
No labels