aboutsummaryrefslogtreecommitdiff
path: root/test/typeparam/list2.go
diff options
context:
space:
mode:
authorDan Scales <danscales@google.com>2021-05-11 19:29:10 -0700
committerDan Scales <danscales@google.com>2021-05-24 22:16:09 +0000
commit4c50721cda74abbf7732638f39a23dfbf6271a48 (patch)
treec8114694dc3a5aa478aaf1a26d2b12d37741dfc8 /test/typeparam/list2.go
parentdcaf785add683fdda9bd0e53395c17c55779a8ac (diff)
downloadgo-4c50721cda74abbf7732638f39a23dfbf6271a48.tar.gz
go-4c50721cda74abbf7732638f39a23dfbf6271a48.zip
[dev.typeparams] cmd/compile: Fix handling of Name nodes during stenciling
The name substitution for stenciling was incorrectly handling non-local names. Made changes to explicitly built the vars[] name substitution map based on the local variables (similar to what inlining substitution does). Then, we we are stenciling a name node, we do NOT make a copy of the name node if it is not in vars[], since it is then a reference to an external name. Added new function localvar() to create the new nodes for the local variables and put them in the vars[] map. New test listimp2.go, added missing test calls in list2.go Change-Id: I8946478250c7bf2bd31c3247089bd50cfeeda0fd Reviewed-on: https://go-review.googlesource.com/c/go/+/322190 Trust: Dan Scales <danscales@google.com> Run-TryBot: Dan Scales <danscales@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'test/typeparam/list2.go')
-rw-r--r--test/typeparam/list2.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/typeparam/list2.go b/test/typeparam/list2.go
index 385193d876..32023cf319 100644
--- a/test/typeparam/list2.go
+++ b/test/typeparam/list2.go
@@ -597,5 +597,14 @@ func TestTransform() {
func main() {
TestList()
+ TestExtending()
+ TestRemove()
+ TestIssue4103()
+ TestIssue6349()
+ TestMove()
+ TestZeroList()
+ TestInsertBeforeUnknownMark()
+ TestInsertAfterUnknownMark()
+ TestTransform()
}