Files
moxa/_test/select13.go
Marc Vertes 82b499a1c8 fix: detect default comm clause in select from AST (#678)
* fix: detect default comm clause in select from AST

The heuristic to distinguish a default comm clause was too weak.
Make it robust by using AST.

Fixes #646.

* rename test to avoid conflict
2020-06-10 12:06:59 +02:00

17 lines
207 B
Go

package main
func main() {
var c interface{} = int64(1)
q := make(chan struct{})
select {
case q <- struct{}{}:
println("unexpected")
default:
_ = c.(int64)
}
println("bye")
}
// Output:
// bye