summaryrefslogtreecommitdiff
path: root/test/chan
diff options
context:
space:
mode:
authorLuuk van Dijk <lvd@golang.org>2011-11-06 22:14:15 +0100
committerLuuk van Dijk <lvd@golang.org>2011-11-06 22:14:15 +0100
commit4757f0170897b110fb14305a915cd8dc6b866b7b (patch)
tree3c7e9600e6b6012414bdc336c3ce73e8cc70f625 /test/chan
parentc0bf244c20c5430d39fa1b108912819f8d588c31 (diff)
downloadgo-4757f0170897b110fb14305a915cd8dc6b866b7b.tar.gz
gc: Better error message for range over non-receive channel.
Fixes issue 2354 R=rsc CC=golang-dev http://codereview.appspot.com/5346044
Diffstat (limited to 'test/chan')
-rw-r--r--test/chan/perm.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/chan/perm.go b/test/chan/perm.go
index af054450e..a43df1982 100644
--- a/test/chan/perm.go
+++ b/test/chan/perm.go
@@ -48,7 +48,10 @@ func main() {
case x := <-cs: // ERROR "receive"
_ = x
}
-
+
+ for _ = range cs {// ERROR "receive"
+ }
+
close(c)
close(cs)
close(cr) // ERROR "receive"