diff options
author | Keith Randall <khr@golang.org> | 2021-06-04 23:01:13 -0700 |
---|---|---|
committer | Keith Randall <khr@golang.org> | 2021-06-07 19:51:26 +0000 |
commit | bcb3927cb51af39f44d810aab809dff27c950697 (patch) | |
tree | 1a09ed62b96fc95c7a46390c75b082b61d0c426f /src/cmd/compile/internal/typecheck/iimport.go | |
parent | f0c97219a3bc5f5c21863c68d4ccf2fb73002d8c (diff) | |
download | go-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/iimport.go')
-rw-r--r-- | src/cmd/compile/internal/typecheck/iimport.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/typecheck/iimport.go b/src/cmd/compile/internal/typecheck/iimport.go index cafb18d7a8..6d42875f49 100644 --- a/src/cmd/compile/internal/typecheck/iimport.go +++ b/src/cmd/compile/internal/typecheck/iimport.go @@ -415,7 +415,7 @@ func (p *importReader) value(typ *types.Type) constant.Value { var kind constant.Kind var valType *types.Type - if typ.Kind() == types.TTYPEPARAM { + if typ.IsTypeParam() { // If a constant had a typeparam type, then we wrote out its // actual constant kind as well. kind = constant.Kind(p.int64()) |