2012-05-19 07:52:01 -05:00
|
|
|
pure fn is_even(i: int) -> bool { (i%2) == 0 }
|
|
|
|
fn even(i: int) : is_even(i) -> int { i }
|
|
|
|
fn main() {
|
|
|
|
let i: int = 4;
|
|
|
|
log(debug, false || { check is_even(i); true });
|
2012-06-30 06:23:59 -05:00
|
|
|
even(i); //~ ERROR unsatisfied precondition
|
2012-05-19 07:52:01 -05:00
|
|
|
}
|