mirror of
https://github.com/golang/go
synced 2024-11-17 09:04:44 -07:00
cmd/compile: allow fieldtrack of unexported fields
The fieldtrack support is experimental and used mainly inside Google, where we have included this change for years. No reason not to make it in the public copy. Change-Id: I5233e4e775ccce60a17098c007aed8c82a0425d7 Reviewed-on: https://go-review.googlesource.com/c/go/+/387355 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
0b76afc75c
commit
7fd9564fcd
@ -1012,9 +1012,6 @@ func usefield(n *ir.SelectorExpr) {
|
||||
if outer.Sym() == nil {
|
||||
base.Errorf("tracked field must be in named struct type")
|
||||
}
|
||||
if !types.IsExported(field.Sym.Name) {
|
||||
base.Errorf("tracked field must be exported (upper case)")
|
||||
}
|
||||
|
||||
sym := reflectdata.TrackSym(outer, field)
|
||||
if ir.CurFunc.FieldTrack == nil {
|
||||
|
Loading…
Reference in New Issue
Block a user