go/test/typeparam/mdempsky
Matthew Dempsky d02d5fda65 test: add test case for type parameter method indexing
When types2 type checks a method expression or method value that
selects a type parameter method, the Selection.Index is indexed based
on the method's index within the type parameter's constraint
interface.

However, with a fully-stenciled implementation, naively using the
index would result in picking a method from the corresponding type
argument's full method set, which could select a different method.

Unified IR currently avoids this because it selects methods based on
name, not index; but experimenting with index-based selection revealed
that there are no test cases that would have caught this failure case.

Change-Id: Idbc39e1ee741714203d4749e47f5bc015af25020
Reviewed-on: https://go-review.googlesource.com/c/go/+/421815
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
2022-08-08 17:39:25 +00:00
..
1.dir [dev.typeparams] test: add regress tests that fail(ed) with -G=3 2021-07-07 11:12:24 +00:00
3.dir [dev.typeparams] test: add regress tests that fail(ed) with -G=3 2021-07-07 11:12:24 +00:00
4.dir [dev.typeparams] test: add regress tests that fail(ed) with -G=3 2021-07-07 11:12:24 +00:00
7.dir [dev.typeparams] test: add regress tests that fail(ed) with -G=3 2021-07-07 11:12:24 +00:00
8.dir cmd/compile/internal/types2: use "implements" rather than "satisfies" in error messages 2021-11-15 21:22:19 +00:00
10.dir [dev.typeparams] test: add regress tests that fail(ed) with -G=3 2021-07-07 11:12:24 +00:00
12.dir [dev.typeparams] test: add regress tests that fail(ed) with -G=3 2021-07-07 11:12:24 +00:00
1.go all: avoid use of cmd/compile -G flag in tests 2022-03-01 19:45:34 +00:00
2.go all: avoid use of cmd/compile -G flag in tests 2022-03-01 19:45:34 +00:00
3.go all: avoid use of cmd/compile -G flag in tests 2022-03-01 19:45:34 +00:00
4.go all: avoid use of cmd/compile -G flag in tests 2022-03-01 19:45:34 +00:00
5.go all: avoid use of cmd/compile -G flag in tests 2022-03-01 19:45:34 +00:00
6.go all: avoid use of cmd/compile -G flag in tests 2022-03-01 19:45:34 +00:00
7.go all: avoid use of cmd/compile -G flag in tests 2022-03-01 19:45:34 +00:00
8.go all: avoid use of cmd/compile -G flag in tests 2022-03-01 19:45:34 +00:00
9.go all: avoid use of cmd/compile -G flag in tests 2022-03-01 19:45:34 +00:00
10.go all: avoid use of cmd/compile -G flag in tests 2022-03-01 19:45:34 +00:00
11.go [dev.typeparams] test: add regress tests that fail(ed) with -G=3 2021-07-07 11:12:24 +00:00
12.go all: avoid use of cmd/compile -G flag in tests 2022-03-01 19:45:34 +00:00
13.go cmd/compile: fix wrong dict param when getting dict type 2022-03-14 17:55:47 +00:00
14.go all: avoid use of cmd/compile -G flag in tests 2022-03-01 19:45:34 +00:00
15.go all: avoid use of cmd/compile -G flag in tests 2022-03-01 19:45:34 +00:00
16.go [dev.unified] test: add regress tests for #53276 and #53328 2022-06-10 21:35:49 +00:00
17.go [dev.unified] test: add regress tests for #53276 and #53328 2022-06-10 21:35:49 +00:00
18.go [dev.unified] test: add regress test for generic select statements 2022-06-29 19:33:57 +00:00
18.out [dev.unified] test: add regress test for generic select statements 2022-06-29 19:33:57 +00:00
19.go test: add test case for type parameter method indexing 2022-08-08 17:39:25 +00:00