]> Cypherpunks repositories - gostls13.git/commit
[dev.typeparams] go/types: adjust printing of embedded struct fields (fixes x/tools...
authorRobert Griesemer <gri@golang.org>
Fri, 19 Feb 2021 01:01:54 +0000 (17:01 -0800)
committerRobert Griesemer <gri@golang.org>
Fri, 19 Feb 2021 01:22:43 +0000 (01:22 +0000)
commit8654db4555bd0537162a72c4514c601a9a8b5c30
treebb1617f1080802826941f6ec305db1f9adf2455b
parent47e4b0739e32db5e057dd372aae16ff981886c15
[dev.typeparams] go/types: adjust printing of embedded struct fields (fixes x/tools/cmd/guru tests)

Prior to 1.16, go/types printed an embedded struct field by simply
printing its type, which may have included a package qualification.
Just printing the type is not useful with generic types and we now
must print the actual field name derived from the type - this leads
to different output for non-generic imported embedded types. Fix by
printing a package qualification in that case.

Change-Id: I2cb2484da7732428d13fdfb5fe4ec1fa1ee813a2
Reviewed-on: https://go-review.googlesource.com/c/go/+/293961
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
src/go/types/typestring.go