about summary refs log tree commit diff
path: root/src/test/compile-fail/pattern-tyvar.rs
blob: cb94ee5c173e6b73a915196df5bb3377dd3cb103 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// -*- 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) {
  alt (t) {
    case (t1(_, some[int](?x))) {
      log x;
    }
    case (_) {
      fail;
    }
  }
}

fn main() {
}