Skip to content

Commit ef1bcde

Browse files
brsongraydon
authored andcommitted
Add test for local declarations with receive. XFAIL in rustc.
1 parent 77a3373 commit ef1bcde

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

Makefile.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,7 @@ TEST_XFAILS_STAGE0 := $(FLOAT_XFAILS) \
653653
clone-with-exterior.rs \
654654
comm.rs \
655655
constrained-type.rs \
656+
decl-with-recv.rs \
656657
destructor-ordering.rs \
657658
iter-ret.rs \
658659
lazychan.rs \

src/test/run-pass/decl-with-recv.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// -*- rust -*-
2+
3+
impure fn main() {
4+
let port[int] po = port();
5+
let chan[int] ch = chan(po);
6+
7+
ch <| 10;
8+
let int i <- po;
9+
check (i == 10);
10+
11+
ch <| 11;
12+
auto j <- po;
13+
check (j == 11);
14+
}

0 commit comments

Comments
 (0)