-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
reflect: verify/ensure that reflect supports the same string/[]byte/[]rune conversions as the spec/implementation #53523
Comments
See #24746 where it is observed that type namedByte byte
var b []namedByte
reflect.ValueOf(b).Bytes() // analogous to []byte(b), which is invalid according to the Go spec |
@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. |
Bumping to 1.21. |
Too late for 1.21. |
We still need to do this but we've lived with this for several releases, so there's no urgency. |
Too late for 1.23. |
Follow-up on #23814.
See https://go-review.googlesource.com/c/go/+/412095/4/test/fixedbugs/issue23814.go for examples.
The text was updated successfully, but these errors were encountered: