Debian Codegraph @

internal/refactor/inline/testdata/issue63298.txtar

raw
1 Regression test for #63298: inlining a function that
2 depends on two packages with the same name leads
3 to duplicate PkgNames.
4
5 -- go.mod --
6 module testdata
7 go 1.12
8
9 -- a/a.go --
10 package a
11
12 func _() {
13 a2() //@ inline(re"a2", result)
14 }
15
16 -- a/a2.go --
17 package a
18
19 import "testdata/b"
20 import anotherb "testdata/another/b"
21
22 func a2() {
23 b.B()
24 anotherb.B()
25 }
26
27 -- b/b.go --
28 package b
29
30 func B() {}
31
32 -- b/another/b.go --
33 package b
34
35 func B() {}
36
37 -- result --
38 package a
39
40 import "testdata/b"
41
42 import anotherb "testdata/another/b"
43
44 func _() {
45 b.B()
46 anotherb.B() //@ inline(re"a2", result)
47 }