Debian Codegraph @

gopls/internal/test/marker/testdata/codeaction/inline-var-76144.txt

raw
1 Regression test for #76144, a panic in refactor.inline.variable.
2
3 It was fixed by CL 683535, making it logically a dup of #74347.
4
5 -- a/a.go --
6 package main
7
8 type A struct {
9 Name string
10 }
11
12 func F(m map[string]A) {
13 human := A{
14 Name: "foo",
15 }
16 m["foo"] = human //@codeaction("hu", "refactor.inline.variable", result=out)
17 }
18 -- @out/a/a.go --
19 package main
20
21 type A struct {
22 Name string
23 }
24
25 func F(m map[string]A) {
26 human := A{
27 Name: "foo",
28 }
29 m["foo"] = A{
30 Name: "foo",
31 } //@codeaction("hu", "refactor.inline.variable", result=out)
32 }