blob: e59a2b8a54d46c5a620e912d4e376e062a037f93 [file]
Regression test for #62667: the callee's reference to Split
was blindly qualified to path.Split even though the imported
PkgName path is shadowed by the parameter of the same name.
The defer (and void-tail reduction) keep a binding decl for
the path parameter instead of substituting g() into Split.
-- go.mod --
module testdata
go 1.12
-- a/a.go --
package a
import "testdata/path"
func A() {
path.Dir(g()) //@ inline(re"Dir", result)
}
func g() string
-- path/path.go --
package path
func Dir(path string) {
defer func(){}()
Split(path)
}
func Split(string) {}
-- result --
package a
import path0 "testdata/path"
func A() {
path := g()
defer func() {}()
path0.Split(path) //@ inline(re"Dir", result)
}
func g() string