summary refs log tree commit diff
path: root/src/test/run-pass/log-linearized.rs
blob: bb042f2359b2d515fa9f9e4961b32bf50efbd8be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Tests that shapes respect linearize_ty_params().

enum option<T> {
    none,
    some(T),
}

type smallintmap<T> = @{mut v: ~[mut option<T>]};

fn mk<T>() -> smallintmap<T> {
    let v: ~[mut option<T>] = ~[mut];
    return @{mut v: v};
}

fn f<T,U>() {
    let sim = mk::<U>();
    log(error, sim);
}

fn main() {
    f::<int,int>();
}