From e9a306e004fb6e9c6ca6045151be0ca8bddd242b Mon Sep 17 00:00:00 2001 From: Cuong Manh Le Date: Fri, 21 Jun 2024 14:45:26 +0700 Subject: [PATCH] types2, go/types: correct NewTypeParam documentation Signature type does not have SetTypeParams method, only Named type. Change-Id: Ic7a25c24cb821540d921eb2c94dfff31f28f7aa4 Reviewed-on: https://go-review.googlesource.com/c/go/+/593955 Reviewed-by: David Chase LUCI-TryBot-Result: Go LUCI Reviewed-by: Robert Findley Auto-Submit: Cuong Manh Le --- src/cmd/compile/internal/types2/typeparam.go | 4 ++-- src/go/types/typeparam.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cmd/compile/internal/types2/typeparam.go b/src/cmd/compile/internal/types2/typeparam.go index 9ad064906f..e22981e1ad 100644 --- a/src/cmd/compile/internal/types2/typeparam.go +++ b/src/cmd/compile/internal/types2/typeparam.go @@ -25,8 +25,8 @@ type TypeParam struct { } // NewTypeParam returns a new TypeParam. Type parameters may be set on a Named -// or Signature type by calling SetTypeParams. Setting a type parameter on more -// than one type will result in a panic. +// type by calling SetTypeParams. Setting a type parameter on more than one type +// will result in a panic. // // The constraint argument can be nil, and set later via SetConstraint. If the // constraint is non-nil, it must be fully defined. diff --git a/src/go/types/typeparam.go b/src/go/types/typeparam.go index 58a02de860..789b63d7a1 100644 --- a/src/go/types/typeparam.go +++ b/src/go/types/typeparam.go @@ -28,8 +28,8 @@ type TypeParam struct { } // NewTypeParam returns a new TypeParam. Type parameters may be set on a Named -// or Signature type by calling SetTypeParams. Setting a type parameter on more -// than one type will result in a panic. +// type by calling SetTypeParams. Setting a type parameter on more than one type +// will result in a panic. // // The constraint argument can be nil, and set later via SetConstraint. If the // constraint is non-nil, it must be fully defined. -- 2.48.1