mirror of
https://github.com/golang/go
synced 2024-11-11 20:20:23 -07:00
[dev.typeparams] cmd/compile: use r.hasTypeParams in typIdx
CL 329571 fold the checking has type params logic, but did not realize that the instance in typIdx can be folded, too. Change-Id: I4682af3779535af6a6e843972cada12ba1bae6ae Reviewed-on: https://go-review.googlesource.com/c/go/+/330389 Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
9bdbf73c98
commit
b55cc6687d
@ -345,7 +345,7 @@ func (pr *pkgReader) typIdx(idx int, implicits, explicits []*types.Type) *types.
|
||||
// TODO(mdempsky): If we're clever, we should be able to still cache
|
||||
// types by tracking which type parameters are used. However, in my
|
||||
// attempts so far, I haven't yet succeeded in being clever enough.
|
||||
if len(implicits)+len(explicits) == 0 {
|
||||
if !r.hasTypeParams() {
|
||||
pr.typs[idx] = typ
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user