From ac4294a176f643c9c1f9bb992bf1b2f690499c30 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Sat, 24 Mar 2012 21:59:16 -0700 Subject: [PATCH] add test that was failing from tedh --- src/test/run-pass/alt-with-ret-arm.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/test/run-pass/alt-with-ret-arm.rs diff --git a/src/test/run-pass/alt-with-ret-arm.rs b/src/test/run-pass/alt-with-ret-arm.rs new file mode 100644 index 000000000000..20fe17d4847b --- /dev/null +++ b/src/test/run-pass/alt-with-ret-arm.rs @@ -0,0 +1,11 @@ +fn main() { + // sometimes we have had trouble finding + // the right type for f, as we unified + // bot and u32 here + let f = alt uint::from_str("1234") { + none { ret () } + some(num) { num as u32 } + }; + assert f == 1234u32; + log(error, f) +}