aa25f22f19
This giant commit changes the syntax of Rust to use "assert" for "check" expressions that didn't mean anything to the typestate system, and continue using "check" for checks that are used as part of typestate checking. Most of the changes are just replacing "check" with "assert" in test cases and rustc.
18 lines
208 B
Rust
18 lines
208 B
Rust
// xfail-stage0
|
|
// -*- rust -*-
|
|
|
|
fn main() {
|
|
let port[int] p = port();
|
|
spawn child(chan(p));
|
|
let int y;
|
|
y <- p;
|
|
log "received";
|
|
log y;
|
|
assert (y == 10);
|
|
}
|
|
|
|
fn child(chan[int] c) {
|
|
c <| 10;
|
|
}
|
|
|