golang.org/x/tools@v0.21.0/internal/refactor/inline/testdata/crosspkg-selfref.txtar (about) 1 A self-reference counts as a free reference, 2 so that it gets properly package-qualified as needed. 3 (Regression test for a bug.) 4 5 -- go.mod -- 6 module testdata 7 go 1.12 8 9 -- a/a.go -- 10 package a 11 12 import "testdata/b" 13 14 func _() { 15 b.F(1) //@ inline(re"F", output) 16 } 17 18 -- b/b.go -- 19 package b 20 21 func F(x int) { 22 F(x + 2) 23 } 24 25 -- output -- 26 package a 27 28 import "testdata/b" 29 30 func _() { 31 b.F(1 + 2) //@ inline(re"F", output) 32 }