// D19 rule 5, the reader's side: a send-only end cannot be read. This is the // statement that turns "I have a capability to send" into "I can drain the // peer's messages", which is exactly the authority confusion A2 forbids. // // expected: cannot receive from send-only channel package main func bad(c chan<- int32) (v int32) { v = <-c return } func main() { select { case <-shutdown: return default: } }