]> Cypherpunks.ru repositories - gostls13.git/commit
[release-branch.go1.9] cmd/compile: consider exported flag in namedata
authorIan Lance Taylor <iant@golang.org>
Fri, 21 Jul 2017 23:37:40 +0000 (16:37 -0700)
committerChris Broadfoot <cbro@golang.org>
Mon, 24 Jul 2017 18:12:06 +0000 (18:12 +0000)
commitfbc9b49790d5676056ad1e56d3132d34bbed1389
tree811aa2ddb54f2ce59fed4b9b4b3344e9a38cf4e0
parent6bb88fc280518150e31bf12744596467796a4528
[release-branch.go1.9] cmd/compile: consider exported flag in namedata

It is possible to have an unexported name with a nil package,
for an embedded field whose type is a pointer to an unexported type.
We must encode that fact in the type..namedata symbol name,
to avoid incorrectly merging an unexported name with an exported name.

Fixes #21120

Change-Id: I2e3879d77fa15c05ad92e0bf8e55f74082db5111
Reviewed-on: https://go-review.googlesource.com/50710
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Reviewed-on: https://go-review.googlesource.com/50970
Reviewed-by: Chris Broadfoot <cbro@golang.org>
src/cmd/compile/internal/gc/reflect.go
test/fixedbugs/issue21120.dir/a.go [new file with mode: 0644]
test/fixedbugs/issue21120.dir/b.go [new file with mode: 0644]
test/fixedbugs/issue21120.dir/main.go [new file with mode: 0644]
test/fixedbugs/issue21120.go [new file with mode: 0644]