rust/src/test/compile-fail/pattern-tyvar.rs
Tim Chevalier e5d095d67e Change option::t to option
Now that core exports "option" as a synonym for option::t, search-and-
replace option::t with option.

The only place that still refers to option::t are the modules in libcore
that use option, because fixing this requires a new snapshot
(forthcoming).
2012-01-31 17:05:20 -08:00

20 lines
270 B
Rust

// -*- rust -*-
use std;
import option;
import option::some;
// error-pattern: mismatched types
enum bar { t1((), option<[int]>), t2, }
fn foo(t: bar) {
alt t {
t1(_, some::<int>(x)) {
log(debug, x);
}
_ { fail; }
}
}
fn main() { }