summaryrefslogtreecommitdiff
path: root/test/chan
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2011-01-28 17:17:38 -0500
committerRuss Cox <rsc@golang.org>2011-01-28 17:17:38 -0500
commitf3d8d0e09097b90b6bcd6330f625ba8f0f26135d (patch)
treede230d70043d851afe7100918e53d5cb391fe0c6 /test/chan
parentc5713de37c331860aca819f7c6a0927ae40600b2 (diff)
downloadgo-f3d8d0e09097b90b6bcd6330f625ba8f0f26135d.tar.gz
runtime: select bug
The sanity checking in pass 2 is wrong when a select is offering to communicate in either direction on a channel and neither case is immediately ready. R=ken2 CC=golang-dev http://codereview.appspot.com/3991047
Diffstat (limited to 'test/chan')
-rw-r--r--test/chan/select3.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/chan/select3.go b/test/chan/select3.go
index 9877b12a9..47941063c 100644
--- a/test/chan/select3.go
+++ b/test/chan/select3.go
@@ -196,4 +196,13 @@ func main() {
case closedch <- 7:
}
})
+
+ // select should not get confused if it sees itself
+ testBlock(always, func() {
+ c := make(chan int)
+ select {
+ case c <- 1:
+ case <-c:
+ }
+ })
}