2012-03-24 23:59:16 -05:00
|
|
|
fn main() {
|
|
|
|
// sometimes we have had trouble finding
|
|
|
|
// the right type for f, as we unified
|
|
|
|
// bot and u32 here
|
2012-07-14 00:57:48 -05:00
|
|
|
let f = alt uint::from_str(~"1234") {
|
2012-03-24 23:59:16 -05:00
|
|
|
none { ret () }
|
|
|
|
some(num) { num as u32 }
|
|
|
|
};
|
|
|
|
assert f == 1234u32;
|
|
|
|
log(error, f)
|
|
|
|
}
|