go/internal/typeparams
Hana (Hyang-Ah) Kim 033cbfc76d internal/typeparams: run go generate with go1.18.2
And fix a minor issue in copytermlist.go --

copytermlist.go replaces type names from go/types with
qualified type names. Use of token.NoPos (filled with
ast.NewIdent) however confuses the go/format printer.
As a result, while transforming

  func (x *term) includes(t Type) bool

to

  func (x *term) includes(t types.Type) bool

go/format printer failed to compute the end position of
the parameter list, concluded RPAREN should be in a
different line from the parameter list, added a comma,
and printed

  func (x *term) includes(t types.Type,) bool

Reuse the replaced node's position instead. (not 100%
correct, but better than NoPos)

Change-Id: Ia34e11562cc80c68dcf4b921ffffd926971c2215
Reviewed-on: https://go-review.googlesource.com/c/tools/+/405536
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Robert Findley <rfindley@google.com>
2022-05-11 13:38:50 +00:00
..
genericfeatures internal/typeparams: guard against generics in stdlib tests 2021-10-25 20:36:35 +00:00
common.go internal/typeparams: remove examples in favor of x/exp/typeparams 2022-05-10 12:58:44 +00:00
common_test.go internal/typeparams: add a generic form of types.AssignableTo 2022-02-08 16:50:25 +00:00
copytermlist.go internal/typeparams: run go generate with go1.18.2 2022-05-11 13:38:50 +00:00
enabled_go117.go Revert "internal/typeparams: hide go1.18 API usage behind a build constraint" 2021-09-28 23:30:19 +00:00
enabled_go118.go Revert "internal/typeparams: hide go1.18 API usage behind a build constraint" 2021-09-28 23:30:19 +00:00
normalize.go all: gofmt 2022-04-12 17:53:17 +00:00
normalize_test.go internal/typeparams: normalize the underlying constraint interface 2021-11-16 01:10:28 +00:00
termlist.go internal/typeparams: run go generate with go1.18.2 2022-05-11 13:38:50 +00:00
typeparams_go117.go internal/typeparams: add a generic form of types.AssignableTo 2022-02-08 16:50:25 +00:00
typeparams_go118.go internal/typeparams: add a generic form of types.AssignableTo 2022-02-08 16:50:25 +00:00
typeparams_test.go internal/typeparams: filter out API diffs related to types.Environment 2021-09-29 15:31:12 +00:00
typeterm.go internal/typeparams: run go generate with go1.18.2 2022-05-11 13:38:50 +00:00