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>
// 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
}