summary refs log tree commit diff
path: root/src/test/compile-fail/pattern-tyvar-2.rs
blob: 36582c83a1eb334ce8d0a5afba998f3b5d8e7f1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// -*- rust -*-

extern mod std;
use option::Some;

// error-pattern: mismatched types

enum bar { t1((), Option<~[int]>), t2, }

fn foo(t: bar) -> int { match t { t1(_, Some(x)) => { return x * 3; } _ => { fail; } } }

fn main() { }