reflect: allows closing read only channels #61445
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, including play.golang.org
What operating system and processor architecture are you using (
go env
)?-- irrelevant (MacOs Monterey 12.6.6 on Intel) --
What did you do?
https://go.dev/play/p/OkmaDlPn47t
What did you expect to see?
Expected
reflect.ValueOf(ch).Close()
to panic, likereflect.ValueOf(ch).Send(reflect.ValueOf("qq"))
does when sending on a receive-only channel.What did you see instead?
The receive-only channel was closed.
The text was updated successfully, but these errors were encountered: