]> Cypherpunks repositories - gostls13.git/commit
cmd/api: use placeholder names for type parameters
authorRobert Findley <rfindley@google.com>
Tue, 12 Oct 2021 15:54:09 +0000 (11:54 -0400)
committerRobert Findley <rfindley@google.com>
Tue, 12 Oct 2021 22:26:55 +0000 (22:26 +0000)
commit78d01be00b68d1f5c3f5eb493f053ba97adc92df
treee12dc2aa50d6f3ee759f2ea6ff78a504cb3dfae3
parent732f6fa9d552c643b6225dd56689eb653ad61473
cmd/api: use placeholder names for type parameters

Changing type parameter names is not a breaking API change, so we should
not include these names in the output of cmd/api. Instead print a
placeholder '$<index>' wherever type parameters are referenced.

This is valid for cmd/api as there is at most one type parameter list in
scope for any exported declaration. If we ever support method type
parameters, we'll need to revisit this syntax.

Change-Id: I7e677b1dab6ffeb0b79afefdb8d2580bef93891c
Reviewed-on: https://go-review.googlesource.com/c/go/+/355389
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/cmd/api/goapi.go
src/cmd/api/testdata/src/pkg/p4/golden.txt
src/cmd/api/testdata/src/pkg/p4/p4.go