reject_chan_zero_capacity.mx raw

   1  // expected: channel capacity must be at least 1
   2  package main
   3  
   4  // A Moxie domain has one thread, so an unbuffered channel has no possible
   5  // listener: the first send could never complete. `chan T{}` is one slot; an
   6  // explicit zero is a declaration that cannot work.
   7  func main() {
   8  	ch := chan int32{:0}
   9  	<-ch
  10  }
  11