Skip to content
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: rtype struct tags may no longer prevent conversion #20914

Closed
josharian opened this issue Jul 6, 2017 · 1 comment
Closed

reflect: rtype struct tags may no longer prevent conversion #20914

josharian opened this issue Jul 6, 2017 · 1 comment
Labels
Documentation FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@josharian
Copy link
Contributor

The docs for reflect.rtype read:

// rtype is the common implementation of most values.
// It is embedded in other, public struct types, but always
// with a unique tag like `reflect:"array"` or `reflect:"ptr"`
// so that code cannot convert from, say, *arrayType to *ptrType.

But as of 1.8, the struct tags are ignored during conversions.

At a minimum, the comment is stale. I don't know whether there are now also bugs as a result.

@ianlancetaylor @bradfitz @crawshaw

@andybons andybons added Documentation NeedsFix The path to resolution is known, but the work has not been done. help wanted labels Apr 11, 2018
@andybons andybons added this to the Go1.11 milestone Apr 11, 2018
@gopherbot
Copy link

Change https://golang.org/cl/121475 mentions this issue: reflect: remove struct tags from unexported types

@golang golang locked and limited conversation to collaborators Jun 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants