summaryrefslogtreecommitdiff
path: root/test/chan/perm.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2011-03-11 14:47:44 -0500
committerRuss Cox <rsc@golang.org>2011-03-11 14:47:44 -0500
commitcd7ff82c4f7f8cdd828dca2ffdfaaafa88e68dff (patch)
treee27ed488b523939eb09324b9fcb863d042fc7743 /test/chan/perm.go
parent7d84874adb56c2e0d79f3792ab007a88759f22e0 (diff)
downloadgo-cd7ff82c4f7f8cdd828dca2ffdfaaafa88e68dff.tar.gz
go code: replace closed(c) with x, ok := <-c
R=golang-dev, rog, bradfitzwork, r CC=golang-dev http://codereview.appspot.com/4243072
Diffstat (limited to 'test/chan/perm.go')
-rw-r--r--test/chan/perm.go15
1 files changed, 6 insertions, 9 deletions
diff --git a/test/chan/perm.go b/test/chan/perm.go
index c725829d1..038ff94e3 100644
--- a/test/chan/perm.go
+++ b/test/chan/perm.go
@@ -22,21 +22,18 @@ func main() {
c <- 0 // ok
<-c // ok
- //TODO(rsc): uncomment when this syntax is valid for receive+check closed
- // x, ok := <-c // ok
- // _, _ = x, ok
+ x, ok := <-c // ok
+ _, _ = x, ok
cr <- 0 // ERROR "send"
<-cr // ok
- //TODO(rsc): uncomment when this syntax is valid for receive+check closed
- // x, ok = <-cr // ok
- // _, _ = x, ok
+ x, ok = <-cr // ok
+ _, _ = x, ok
cs <- 0 // ok
<-cs // ERROR "receive"
- ////TODO(rsc): uncomment when this syntax is valid for receive+check closed
- //// x, ok = <-cs // ERROR "receive"
- //// _, _ = x, ok
+ x, ok = <-cs // ERROR "receive"
+ _, _ = x, ok
select {
case c <- 0: // ok