[dev.typeparams] cmd/compile: avoid adding incorrectly instantiated types to the dictionary
FUNCINST nodes aren't instantiated correctly. Skip those types when
adding to the set of types considered for the dictionary. Those types
include those which are uninstantiated(have tparams), and those with
type parameters that aren't a parameter of the containing function
(they are the type parameter of the function being called).
Allow func types to be put in the dictionary.
Change-Id: I26bab85d3eebc2f54d02b4bba5e31407faf7c5b2
Reviewed-on: https://go-review.googlesource.com/c/go/+/336129 Reviewed-by: Dan Scales <danscales@google.com>
Trust: Dan Scales <danscales@google.com>
Trust: Keith Randall <khr@golang.org>