3 // Copyright 2012 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
7 // Order of operations in select.
12 c := make(chan int, 1)
15 case c <- x: // should see x = 0, not x = 42 (after makec)
16 case <-makec(&x): // should be evaluated only after c and x on previous line
24 func makec(px *int) chan bool {
27 return make(chan bool, 0)