]> Cypherpunks repositories - gostls13.git/commit
cmd/compile, reflect: use field pkgPath if needed
authorIan Lance Taylor <iant@golang.org>
Thu, 17 Nov 2016 00:13:22 +0000 (16:13 -0800)
committerIan Lance Taylor <iant@golang.org>
Thu, 17 Nov 2016 01:19:46 +0000 (01:19 +0000)
commit011cb6423187699e26553580d97518f40966d32b
tree77d5e7aaf461c281c55d9334170161699596be81
parentfbf92436b95d91151ce6717f40c46614ee68d487
cmd/compile, reflect: use field pkgPath if needed

It's possible for the pkgPath of a field to be different than that of
the struct type as a whole. In that case, store the field's pkgPath in
the name field. Use the field's pkgPath when setting PkgPath and when
checking for type identity.

Fixes #17952.

Change-Id: Iebaf92f0054b11427c8f6e4158c3bebcfff06f45
Reviewed-on: https://go-review.googlesource.com/33333
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
src/cmd/compile/internal/gc/reflect.go
src/reflect/all_test.go
src/reflect/type.go