Skip to content

Commit 3b58707

Browse files
author
Eric Holk
committed
---
yaml --- r: 3211 b: refs/heads/master c: 71e1db5 h: refs/heads/master i: 3209: 469127e 3207: 3bb8bda v: v3
1 parent ae85119 commit 3b58707

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 6e6bc5076c6824b690204ff3be12273976f2d3d3
2+
refs/heads/master: 71e1db596cebc35e2218ae011da2c76ee4ed5532

trunk/src/test/run-pass/issue-507.rs

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
2+
/*
3+
This is a test case for Issue 507.
4+
5+
https://github.com/graydon/rust/issues/507
6+
*/
7+
8+
use std;
9+
10+
import std::task::join;
11+
12+
fn grandchild(chan[int] c) {
13+
c <| 42;
14+
}
15+
16+
fn child(chan[int] c) {
17+
auto _grandchild = spawn grandchild(c);
18+
join(_grandchild);
19+
}
20+
21+
fn main() {
22+
let port[int] p = port();
23+
24+
auto _child = spawn child(chan(p));
25+
26+
let int x;
27+
p |> x;
28+
29+
log x;
30+
31+
assert(x == 42);
32+
33+
join(_child);
34+
}

0 commit comments

Comments
 (0)