summary refs log tree commit diff
path: root/src/test/compile-fail/pred-on-wrong-slots.rs
blob: 3d887e8d6ef669d8f1db5492a20971708d28ee79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// -*- rust -*-

// error-pattern: lt(a, c)

fn f(a: int, b: int) : lt(a, b) { }

pure fn lt(a: int, b: int) -> bool { ret a < b; }

fn main() {
    let a: int = 10;
    let b: int = 23;
    let c: int = 77;
    check (lt(a, b));
    check (lt(b, c));
    f(a, b);
    f(a, c);
}