21 lines
302 B
Rust
21 lines
302 B
Rust
// -*- rust -*-
|
|
|
|
// error-pattern: impure function used in constraint
|
|
|
|
fn f(int a, int b) : lt(a,b) {
|
|
}
|
|
|
|
impure fn lt(int a, int b) -> bool {
|
|
let port[int] p = port();
|
|
let chan[int] c = chan(p);
|
|
c <| 10;
|
|
ret true;
|
|
}
|
|
|
|
fn main() {
|
|
let int a = 10;
|
|
let int b = 23;
|
|
check lt(a,b);
|
|
f(a,b);
|
|
}
|