aboutsummaryrefslogtreecommitdiff
path: root/src/go/types/predicates.go
diff options
context:
space:
mode:
authorRobert Findley <rfindley@google.com>2021-11-15 23:39:22 -0500
committerRobert Findley <rfindley@google.com>2021-11-16 15:35:52 +0000
commit7c50ef6c8c4c827db45a3327cb950913cf9d489b (patch)
treeb570a3df02a34195eec03464cb795543ea6da78c /src/go/types/predicates.go
parentf041c7e3028545ba39c60d6e20ab9b74c01bbf33 (diff)
downloadgo-7c50ef6c8c4c827db45a3327cb950913cf9d489b.tar.gz
go-7c50ef6c8c4c827db45a3327cb950913cf9d489b.zip
go/types: remove asTypeParam and simplify some code
This is a port of CL 363438 from types2 to go/types. Change-Id: I87c76d31b398b9ce406f96b0030ee458619b3dbe Reviewed-on: https://go-review.googlesource.com/c/go/+/364235 Trust: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
Diffstat (limited to 'src/go/types/predicates.go')
-rw-r--r--src/go/types/predicates.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/go/types/predicates.go b/src/go/types/predicates.go
index 2d9b9c4c07..d0697b1ad7 100644
--- a/src/go/types/predicates.go
+++ b/src/go/types/predicates.go
@@ -92,7 +92,7 @@ func IsInterface(t Type) bool {
// isTypeParam reports whether t is a type parameter.
func isTypeParam(t Type) bool {
- _, ok := under(t).(*TypeParam)
+ _, ok := t.(*TypeParam)
return ok
}