Skip to content

Commit c84854a

Browse files
committed
gopls/internal/test/marker: another test case for golang/go#76144
For golang/go#76144 For goalng/go#74347 Change-Id: Icce9bc5edf257adc8e377c4059b14eddd6d8428c Reviewed-on: https://go-review.googlesource.com/c/tools/+/717360 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Madeline Kalil <mkalil@google.com>
1 parent f16791f commit c84854a

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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+
}

0 commit comments

Comments
 (0)