gopls/internal/test/marker/testdata/codeaction/inline-var-74347.txt
raw| 1 | This is a regression test of a crash in refactor.inline.variable. |
| 2 | |
| 3 | -- go.mod -- |
| 4 | module example.com/a |
| 5 | go 1.18 |
| 6 | |
| 7 | -- a/a.go -- |
| 8 | package a |
| 9 | |
| 10 | func _() { |
| 11 | x := func(notfree int) { _ = notfree } |
| 12 | println(x) //@codeaction("x", "refactor.inline.variable", result=out) |
| 13 | } |
| 14 | -- @out/a/a.go -- |
| 15 | package a |
| 16 | |
| 17 | func _() { |
| 18 | x := func(notfree int) { _ = notfree } |
| 19 | println(func(notfree int) { _ = notfree }) //@codeaction("x", "refactor.inline.variable", result=out) |
| 20 | } |