Skip to content

Commit 7fd9564

Browse files
committed
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 <[email protected]> Run-TryBot: Russ Cox <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent 0b76afc commit 7fd9564

File tree

1 file changed

+0
-3
lines changed
  • src/cmd/compile/internal/walk

1 file changed

+0
-3
lines changed

src/cmd/compile/internal/walk/expr.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,9 +1012,6 @@ func usefield(n *ir.SelectorExpr) {
10121012
if outer.Sym() == nil {
10131013
base.Errorf("tracked field must be in named struct type")
10141014
}
1015-
if !types.IsExported(field.Sym.Name) {
1016-
base.Errorf("tracked field must be exported (upper case)")
1017-
}
10181015

10191016
sym := reflectdata.TrackSym(outer, field)
10201017
if ir.CurFunc.FieldTrack == nil {

0 commit comments

Comments
 (0)