]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.typeparams] cmd/compile: make sure types added to the dictionary are instantiate...
authorKeith Randall <khr@golang.org>
Thu, 22 Jul 2021 02:17:20 +0000 (19:17 -0700)
committerKeith Randall <khr@golang.org>
Thu, 22 Jul 2021 18:09:49 +0000 (18:09 +0000)
commit5cb84f0604797df436d8fde548d4f797b3a6c245
tree97668005f08609ed9984c1c264f6de2d43b69333
parent73162a54c2885d32d40067d2e4fbe26bbe5c7d65
[dev.typeparams] cmd/compile: make sure types added to the dictionary are instantiated correctly

Make sure the instantiating types are the type parameters of the containing
function (or types derived from those).

The one exception is the argument of a OFUNCINST, whose type
parameters are those of the declaration site of the function or method
being instantiated. We skip those types.

Change-Id: I4b3ff22eb8a81a76476930cf8ed2a7dd6489d8b8
Reviewed-on: https://go-review.googlesource.com/c/go/+/336352
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>
src/cmd/compile/internal/noder/stencil.go