gopls/internal/test/marker/testdata/codeaction/removeparam_funcvalue.txt
raw| 1 | This test exercises change signature refactoring handling of function values. |
| 2 | |
| 3 | TODO(rfindley): use a literalization strategy to allow these references. |
| 4 | |
| 5 | -- go.mod -- |
| 6 | module unused.mod |
| 7 | |
| 8 | go 1.18 |
| 9 | |
| 10 | -- a/a.go -- |
| 11 | package a |
| 12 | |
| 13 | func A(x, unused int) int { //@codeaction("unused", "refactor.rewrite.removeUnusedParam", err=re"non-call function reference") |
| 14 | return x |
| 15 | } |
| 16 | |
| 17 | func _() { |
| 18 | _ = A |
| 19 | } |