gopls/internal/test/marker/testdata/implementation/genericmethods.txt
raw| 1 | Test of 'implementation' query on generic methods, which don't |
| 2 | participate in interface satisfaction. |
| 3 | |
| 4 | -- flags -- |
| 5 | -min_go=go1.27 |
| 6 | |
| 7 | -- go.mod -- |
| 8 | module example.com |
| 9 | go 1.27 |
| 10 | |
| 11 | -- a/a.go -- |
| 12 | package a |
| 13 | |
| 14 | type C struct{} |
| 15 | |
| 16 | func (C) F[T any](T) {} //@ implementation("F") |
| 17 | |
| 18 | -- b/a.go -- |
| 19 | package a |
| 20 | |
| 21 | type I interface { |
| 22 | F(int) |
| 23 | } |