The package of a struct field is independent of the type of the struct field - the old code was technically not correct. That said, it does not seem possible (or very difficult) to create a test case because for exported anonymous fields that field package doesn't matter (it's not needed for name identity), and non-exported anonymous fields cannot be accessed from an imported package. R=adonovan CC=golang-codereviews https://golang.org/cl/47560043 |
||
|---|---|---|
| .. | ||
| testdata | ||
| exportdata.go | ||
| gcimporter.go | ||
| gcimporter_test.go | ||