go/internal/typeparams
Robert Findley ea5e1dc8bc internal/typeparams: add a helper to return the origin method
With instantiated types, method objects are no longer unique: they may
be instantiations of methods with generic receiver. However, some
use-cases require finding the canonical method representing the method
in the source. For these use-cases, provide an OriginMethod helper.

For golang/go#50447

Change-Id: I6f8af3fb5c5eeefb11f8f3bdba54cd6692ca389f
Reviewed-on: https://go-review.googlesource.com/c/tools/+/380554
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Tim King <taking@google.com>
2022-02-03 14:02:38 +00:00
..
example internal/typeparams/example: start adding a guide to generics for tools 2022-01-22 21:07:13 +00:00
genericfeatures internal/typeparams: guard against generics in stdlib tests 2021-10-25 20:36:35 +00:00
common.go internal/typeparams: add a helper to return the origin method 2022-02-03 14:02:38 +00:00
common_test.go internal/typeparams: add a helper to return the origin method 2022-02-03 14:02:38 +00:00
copytermlist.go internal/typeparams: copy the term list algorithm from go/types 2021-10-14 22:21:32 +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 go/types/typeutil: add support for mapping generic types 2021-12-02 03:14:37 +00:00
normalize_test.go internal/typeparams: normalize the underlying constraint interface 2021-11-16 01:10:28 +00:00
termlist.go internal/typeparams: copy the term list algorithm from go/types 2021-10-14 22:21:32 +00:00
typeparams_go117.go internal/typeparams: simplify the IndexExpr API 2022-01-19 20:29:28 +00:00
typeparams_go118.go internal/typeparams: simplify the IndexExpr API 2022-01-19 20:29:28 +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: copy the term list algorithm from go/types 2021-10-14 22:21:32 +00:00