From 01e522a97384d2c81c90490654c2749bfe05045e Mon Sep 17 00:00:00 2001 From: Robert Findley Date: Fri, 25 Feb 2022 18:20:12 -0500 Subject: [PATCH] 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 --- src/cmd/compile/internal/types2/type.go | 4 +--- src/go/types/type.go | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) 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. -- 2.50.0