aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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);
+}