2011-06-28 11:48:54 -07:00
|
|
|
// error-pattern: Unsatisfied precondition constraint (for example, even(y
|
|
|
|
|
2011-12-22 17:53:53 -08:00
|
|
|
fn print_even(y: int) : even(y) { log(debug, y); }
|
2011-06-28 11:48:54 -07:00
|
|
|
|
2011-08-23 18:25:50 -07:00
|
|
|
pure fn even(y: int) -> bool { true }
|
2011-06-28 11:48:54 -07:00
|
|
|
|
|
|
|
fn main() {
|
2011-08-19 15:16:48 -07:00
|
|
|
let y: int = 42;
|
|
|
|
check (even(y));
|
|
|
|
do {
|
|
|
|
print_even(y);
|
2011-09-24 16:13:32 -07:00
|
|
|
do { do { do { y += 1; } while false } while false } while false
|
2011-08-19 15:16:48 -07:00
|
|
|
} while true
|
2011-07-27 14:48:34 +02:00
|
|
|
}
|