]> Cypherpunks repositories - gostls13.git/commit
[dev.typeparams] cmd/compile: avoid adding incorrectly instantiated types to the...
authorKeith Randall <khr@golang.org>
Tue, 20 Jul 2021 21:52:19 +0000 (14:52 -0700)
committerKeith Randall <khr@golang.org>
Wed, 21 Jul 2021 21:05:50 +0000 (21:05 +0000)
commit4a97fe8c2298ae879904d3cf304ca29500abf169
tree6306e5a08d2b0a644c16dbe9321d567298257b61
parent2fe4b14795fe20fa3ba8efbe92b88f2d564509d2
[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>
src/cmd/compile/internal/noder/stencil.go