summary refs log tree commit diff
path: root/src/test/compile-fail/issue-1451.rs
blob: 549e37acdad83aaf9546203e1c3e792222b51a03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// xfail-test
type T = { mut f: fn@() };
type S = { f: fn@() };

fn fooS(t: S) {
}

fn fooT(t: T) {
}

fn bar() {
}

fn main() {
    let x: fn@() = bar;
    fooS({f: x});
    fooS({f: bar});

    let x: fn@() = bar;
    fooT({mut f: x});
    fooT({mut f: bar});
}