golang.org/x/tools@v0.21.0/internal/refactor/inline/testdata/issue63298.txtar (about) 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 ( 41 "testdata/b" 42 b0 "testdata/another/b" 43 44 //@ inline(re"a2", result) 45 ) 46 47 func _() { 48 b.B() 49 b0.B() 50 }