]> Cypherpunks.ru repositories - gostls13.git/commitdiff
test: test that x := <-c accepts a general expression
authorIan Lance Taylor <iant@golang.org>
Wed, 1 Feb 2012 15:31:00 +0000 (07:31 -0800)
committerIan Lance Taylor <iant@golang.org>
Wed, 1 Feb 2012 15:31:00 +0000 (07:31 -0800)
The gccgo compiler used to fail to parse this.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5610051

test/chan/select3.go

index d919de3e0d957eefbb15ca0850fed94cd1d3e6a7..fd881c90e99318d62782ac9629057980c553f212 100644 (file)
@@ -197,13 +197,13 @@ func main() {
        })
        testBlock(never, func() {
                select {
-               case x := <-closedch:
+               case x := (<-closedch):
                        _ = x
                }
        })
        testBlock(never, func() {
                select {
-               case x, ok := <-closedch:
+               case x, ok := (<-closedch):
                        _, _ = x, ok
                }
        })