Follow-up on #23814. See https://go-review.googlesource.com/c/go/+/412095/4/test/fixedbugs/issue23814.go for examples.
Comment From: dsnet
See #24746 where it is observed that reflect
lets you do:
type namedByte byte
var b []namedByte
reflect.ValueOf(b).Bytes() // analogous to []byte(b), which is invalid according to the Go spec
Comment From: griesemer
@dsnet That conversion is a slice-to-slice conversion which always required that element types be identical (playground); this seems a bit different from the string->bytes/runes and bytes/runes->string conversions, which are special.
That is, I'd argue that reflect is incorrect in that case.
Comment From: aclements
Bumping to 1.21.
Comment From: griesemer
Too late for 1.21.
Comment From: griesemer
We still need to do this but we've lived with this for several releases, so there's no urgency. Bumping to 1.23.
Comment From: griesemer
Too late for 1.23.