cmd/gc: fix order of channel evaluation of receive channels
Normally, an expression of the form x.f or *y can be reordered with function calls and communications. Select is stricter than normal: each channel expression is evaluated in source order. If you have case <-x.f and case <-foo(), then if the evaluation of x.f causes a panic, foo must not have been called. (This is in contrast to an expression like x.f + foo().) Enforce this stricter ordering. Fixes #8336. LGTM=dvyukov R=golang-codereviews, dvyukov CC=golang-codereviews, r https://golang.org/cl/126570043
Showing
test/fixedbugs/issue8336.go
0 → 100644
Please register or sign in to comment