rust/src/test/compile-fail/pattern-tyvar.rs
2012-09-05 12:32:05 -07:00

19 lines
261 B
Rust

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