1
0
mirror of https://github.com/golang/go synced 2024-11-17 19:44:43 -07:00
go/test/typeparam
Dan Scales f2717b31b5 cmd/compile: deal correctly with unnamed function params during stenciling
During substitution of the function type during stenciling, we must set
the Name nodes of the param/result fields of the func type. We get those
name nodes from the substituted Dcl nodes of the PPARAMS and PPARAMOUTs.
But we must check that the names match with the Dcl nodes, so that we
skip any param fields that correspond to unnamed (in) parameters.

Added a few tests to typelist.go by removing a variety of unneeded
function parameter names.

Change-Id: If786961b64549da6f18eeeb5060ea58fab874eb9
Reviewed-on: https://go-review.googlesource.com/c/go/+/305912
Trust: Dan Scales <danscales@google.com>
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Dan Scales <danscales@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
2021-03-31 00:52:26 +00:00
..
absdiff.go cmd/compile: getting more built-ins to work with generics 2021-03-17 16:53:00 +00:00
adder.go cmd/compile: replace calls to typecheck with transform functions 2021-03-23 04:23:52 +00:00
append.go cmd/compile: getting more built-ins to work with generics 2021-03-17 16:53:00 +00:00
chans.go
combine.go
cons.go
double.go cmd/compile: get untyped constants working in generic functions 2021-03-18 22:18:32 +00:00
fact.go
graph.go
importtest.go
index.go
interfacearg.go cmd/compile: fix creation of named generic types (setting of t.nod) 2021-03-30 04:48:27 +00:00
list2.go cmd/compile: replace calls to typecheck with transform functions 2021-03-23 04:23:52 +00:00
list.go cmd/compile: get untyped constants working in generic functions 2021-03-18 22:18:32 +00:00
lockable.go
map.go
maps.go
metrics.go
min.go
ordered.go
orderedmap.go
pair.go
sets.go
settable.go cmd/compile: getting more built-ins to work with generics 2021-03-17 16:53:00 +00:00
slices.go
smallest.go
smoketest.go
stringable.go
stringer.go
struct.go
sum.go
tparam1.go
typelist.go cmd/compile: deal correctly with unnamed function params during stenciling 2021-03-31 00:52:26 +00:00
value.go