2011-06-28 13:48:54 -05:00
|
|
|
// xfail-stage0
|
|
|
|
// error-pattern: Unsatisfied precondition constraint (for example, even(y
|
|
|
|
|
|
|
|
fn print_even(int y) : even(y) {
|
|
|
|
log y;
|
|
|
|
}
|
|
|
|
|
|
|
|
pred even(int y) -> bool {
|
|
|
|
true
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
|
|
|
let int y = 42;
|
|
|
|
let int x = 1;
|
|
|
|
check even(y);
|
|
|
|
while (true) {
|
|
|
|
print_even(y);
|
|
|
|
while (true) {
|
|
|
|
while (true) {
|
2011-06-29 17:11:20 -05:00
|
|
|
while (true) {
|
|
|
|
y += x;
|
|
|
|
}
|
2011-06-28 13:48:54 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|