mirror of
https://github.com/golang/go
synced 2024-10-02 22:25:08 +00:00
test: test that x := <-c accepts a general expression
The gccgo compiler used to fail to parse this. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5610051
This commit is contained in:
parent
8dd3de4d4b
commit
4e77e0f294
|
@ -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
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue