mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
reflect: adjust access to unexported embedded structs
This CL changes reflect to allow access to exported fields and methods in unexported embedded structs for gccgo and after gc has been adjusted to disallow access to embedded unexported structs. Adresses #12367, #7363, #11007, and #7247. Change-Id: If80536eab35abcd25300d8ddc2d27d5c42d7e78e Reviewed-on: https://go-review.googlesource.com/14010 Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
parent
fb7178e7cc
commit
adf9b30e55
3 changed files with 20 additions and 13 deletions
|
|
@ -496,7 +496,7 @@ func (t *uncommonType) Method(i int) (m Method) {
|
|||
fl := flag(Func)
|
||||
if p.pkgPath != nil {
|
||||
m.PkgPath = *p.pkgPath
|
||||
fl |= flagRO
|
||||
fl |= flagStickyRO
|
||||
}
|
||||
mt := p.typ
|
||||
m.Type = mt
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue