diff options
author | Russ Cox <rsc@golang.org> | 2011-03-11 14:47:44 -0500 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2011-03-11 14:47:44 -0500 |
commit | cd7ff82c4f7f8cdd828dca2ffdfaaafa88e68dff (patch) | |
tree | e27ed488b523939eb09324b9fcb863d042fc7743 /test/chan/perm.go | |
parent | 7d84874adb56c2e0d79f3792ab007a88759f22e0 (diff) | |
download | go-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.go | 15 |
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 |