rust/src/test/run-fail/if-cond-bot.rs
Tim Chevalier 001df3f0ca Revert "Revert "Handle conditionals on _|_ - typed values correctly""
This reverts commit ea81c03960.

Changed the case in trans_if where the conditional is _|_ - typed
but the block is terminated to return the result of the cond,
instead of nil.

This passes "make check" with optimization disabled as well as
enabled.
2011-08-03 13:07:41 -07:00

4 lines
108 B
Rust

// error-pattern:quux
fn my_err(s: str) -> ! { log_err s; fail "quux"; }
fn main() { if my_err("bye") { } }