aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Anderson <[email protected]>2011-03-24 20:50:05 -0400
committerGraydon Hoare <[email protected]>2011-03-25 11:01:52 -0700
commitef1bcdea7025f6fd18fcd645804f83186546fa97 (patch)
tree66b5134053f803c0268c6818315820abfeabff93 /src
parentrustc: Create a crate metadata cache (diff)
downloadrust-ef1bcdea7025f6fd18fcd645804f83186546fa97.tar.xz
rust-ef1bcdea7025f6fd18fcd645804f83186546fa97.zip
Add test for local declarations with receive. XFAIL in rustc.
Diffstat (limited to 'src')
-rw-r--r--src/test/run-pass/decl-with-recv.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/run-pass/decl-with-recv.rs b/src/test/run-pass/decl-with-recv.rs
new file mode 100644
index 00000000..7698ee01
--- /dev/null
+++ b/src/test/run-pass/decl-with-recv.rs
@@ -0,0 +1,14 @@
+// -*- rust -*-
+
+impure fn main() {
+ let port[int] po = port();
+ let chan[int] ch = chan(po);
+
+ ch <| 10;
+ let int i <- po;
+ check (i == 10);
+
+ ch <| 11;
+ auto j <- po;
+ check (j == 11);
+}