aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass/size-and-align.rs
blob: 94fa3bc1419597934f44beef233e0df7fe897d04 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// -*- rust -*-

use std;
import std._vec;

type clam[T] = tag(a(T, int), b());

fn uhoh[T](vec[clam[T]] v) {
  alt (v.(1)) {
    case (a[T](t, u)) { log "incorrect"; log u; fail; }
    case (b[T]()) { log "correct"; }
  }
}

fn main() {
  let vec[clam[int]] v = vec(b[int](), b[int](), a[int](42, 17));
  uhoh[int](v);
}