Skip to content

Commit ac4294a

Browse files
committed
add test that was failing from tedh
1 parent 7ae757f commit ac4294a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/test/run-pass/alt-with-ret-arm.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
fn main() {
2+
// sometimes we have had trouble finding
3+
// the right type for f, as we unified
4+
// bot and u32 here
5+
let f = alt uint::from_str("1234") {
6+
none { ret () }
7+
some(num) { num as u32 }
8+
};
9+
assert f == 1234u32;
10+
log(error, f)
11+
}

0 commit comments

Comments
 (0)