aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/typecheck/subr.go
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2021-06-04 23:01:13 -0700
committerKeith Randall <khr@golang.org>2021-06-07 19:51:26 +0000
commitbcb3927cb51af39f44d810aab809dff27c950697 (patch)
tree1a09ed62b96fc95c7a46390c75b082b61d0c426f /src/cmd/compile/internal/typecheck/subr.go
parentf0c97219a3bc5f5c21863c68d4ccf2fb73002d8c (diff)
downloadgo-bcb3927cb51af39f44d810aab809dff27c950697.tar.gz
go-bcb3927cb51af39f44d810aab809dff27c950697.zip
[dev.typeparams] cmd/compile: introduce IsTypeParam() helper
better than Kind() == types.TTYPEPARAM Change-Id: I4f35a177cd0cda3be615a92b7b2af1b5a60a3bbc Reviewed-on: https://go-review.googlesource.com/c/go/+/325410 Trust: Keith Randall <khr@golang.org> Trust: Dan Scales <danscales@google.com> Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Dan Scales <danscales@google.com>
Diffstat (limited to 'src/cmd/compile/internal/typecheck/subr.go')
-rw-r--r--src/cmd/compile/internal/typecheck/subr.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/typecheck/subr.go b/src/cmd/compile/internal/typecheck/subr.go
index 8ef49f91c8..e9a9a57126 100644
--- a/src/cmd/compile/internal/typecheck/subr.go
+++ b/src/cmd/compile/internal/typecheck/subr.go
@@ -984,7 +984,7 @@ func (ts *Tsubster) Typ(t *types.Type) *types.Type {
return t
}
- if t.Kind() == types.TTYPEPARAM {
+ if t.IsTypeParam() {
for i, tp := range ts.Tparams {
if tp == t {
return ts.Targs[i]