]> Cypherpunks repositories - gostls13.git/commitdiff
go/types,types2: revert documentation for Type.Underlying
authorRobert Findley <rfindley@google.com>
Fri, 25 Feb 2022 23:20:12 +0000 (18:20 -0500)
committerRobert Findley <rfindley@google.com>
Fri, 25 Feb 2022 23:38:11 +0000 (23:38 +0000)
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 <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/cmd/compile/internal/types2/type.go
src/go/types/type.go

index ca8f155791bedfdccb61da2838e4380b56f9584d..0fe39dbca4645d9102999ff2970850d16737efc0 100644 (file)
@@ -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.
index 323365aefe356d287f230a471dcce9eb6a68e669..130637530bb603a83b056b8ee47846b65151932e 100644 (file)
@@ -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.