Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reflect: panic on recv channel close
It is possible to call reflect.ValueOf(ch).Close() on a recv-only channel, while close(ch) is a compile-time error. Following the same reflect semantics as send and recv this should result in a panic. Fixes #61445 Change-Id: I2a9ee8f45963593a37bd6df4643dd64fb322f9f9 GitHub-Last-Rev: fe2d5e09f5bb5536ac25d1606cf3744fb7a0a4a9 GitHub-Pull-Request: golang/go#61453 Reviewed-on: https://go-review.googlesource.com/c/go/+/511295 Auto-Submit: Ian Lance Taylor <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> Reviewed-by: Bryan Mills <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
- Loading branch information