rust/src/test/run-pass/alt-bot.rs
Tim Chevalier 1a96e79fe0 Make _|_ unify with anything
The typechecker had a number of special cases for unifying types
with _|_ (as with checking if and alt). But, a value of type _|_
should be usable in any context, as such a value always diverges,
and will never be used by its immediate context. Changed unify
accordingly, removed special cases.
2011-05-26 20:50:25 -07:00

15 lines
191 B
Rust

// xfail-stage0
use std;
import std::option::*;
fn main() {
let int i = alt (some[int](3)) {
case (none[int]) {
fail
}
case (some[int](_)) {
5
}
};
log i;
}