rust/src/test/compile-fail/pattern-tyvar-2.rs
2011-05-20 19:54:14 -07:00

26 lines
301 B
Rust

// -*- rust -*-
use std;
import std::option;
import std::option::some;
// error-pattern: mismatched types
tag bar {
t1((), option::t[vec[int]]);
t2;
}
fn foo(bar t) -> int {
alt (t) {
case (t1(_, some(?x))) {
ret (x * 3);
}
case (_) {
fail;
}
}
}
fn main() {
}