From: Robert Findley Date: Fri, 25 Feb 2022 23:20:12 +0000 (-0500) Subject: go/types,types2: revert documentation for Type.Underlying X-Git-Tag: go1.18~33^2~13 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=01e522a97384d2c81c90490654c2749bfe05045e;p=gostls13.git go/types,types2: revert documentation for Type.Underlying In the dev.typeparams branch, the documentation for Type.Underlying was updated with commentary about forwarding chains. This aspect of Underlying should not be exposed to the user. Revert to the documentation of Go 1.16. Fixes #51036 Change-Id: I4b73d3908a88606314aab56540cca91c014dc426 Reviewed-on: https://go-review.googlesource.com/c/go/+/388036 Trust: Robert Findley Run-TryBot: Robert Findley TryBot-Result: Gopher Robot Reviewed-by: Robert Griesemer --- diff --git a/src/cmd/compile/internal/types2/type.go b/src/cmd/compile/internal/types2/type.go index ca8f155791..0fe39dbca4 100644 --- a/src/cmd/compile/internal/types2/type.go +++ b/src/cmd/compile/internal/types2/type.go @@ -7,9 +7,7 @@ package types2 // A Type represents a type of Go. // All types implement the Type interface. type Type interface { - // Underlying returns the underlying type of a type - // w/o following forwarding chains. Only used by - // client packages. + // Underlying returns the underlying type of a type. Underlying() Type // String returns a string representation of a type. diff --git a/src/go/types/type.go b/src/go/types/type.go index 323365aefe..130637530b 100644 --- a/src/go/types/type.go +++ b/src/go/types/type.go @@ -7,9 +7,7 @@ package types // A Type represents a type of Go. // All types implement the Type interface. type Type interface { - // Underlying returns the underlying type of a type - // w/o following forwarding chains. Only used by - // client packages. + // Underlying returns the underlying type of a type. Underlying() Type // String returns a string representation of a type.