rust/src/test/run-pass/alt-with-ret-arm.rs
2012-08-26 15:56:16 -07:00

12 lines
279 B
Rust

fn main() {
// sometimes we have had trouble finding
// the right type for f, as we unified
// bot and u32 here
let f = match uint::from_str(~"1234") {
None => return (),
Some(num) => num as u32
};
assert f == 1234u32;
log(error, f)
}