summary refs log tree commit diff
path: root/src/test/compile-fail/tstate-while-loop-unsat-constriants.rs
blob: 5fff9aa9cb50c6d7fb36c62c7ef319c1a36aa82c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// error-pattern:unsatisfied precondition constraint (for example, even(y

fn print_even(y: int) : even(y) { log(debug, y); }

pure fn even(y: int) -> bool { true }

fn main() {

    let mut y: int = 42;
    let mut x: int = 1;
    check (even(y));
    loop {
        print_even(y);
        while true { while true { while true { y += x; } } }
    }
}