rust/src/test/run-pass/alt-bot-2.rs
Tim Chevalier e0985c1060 Handle alt on a _|_ - typed value
Return the result of the discriminant from trans_alt,
rather than nil, in the _|_ case. This was breaking the
enclosed test case (alt-bot-2) when optimization was disabled.

Closes #769
2011-08-04 16:07:26 -07:00

4 lines
122 B
Rust

// n.b. This was only ever failing with optimization disabled.
fn a() -> int { alt ret 1 { 2 { 3 } } }
fn main() { a(); }