importPkg refactor: don't depend token.Pos

This commit is contained in:
xushiwei
2024-05-07 17:31:25 +08:00
parent ff36c3dfae
commit bc3dca45e7
5 changed files with 73 additions and 55 deletions

View File

@@ -165,7 +165,9 @@ func TestErrInitLinkname(t *testing.T) {
}
}()
var ctx context
ctx.initLinkname("foo", "//go:linkname Printf printf", false)
ctx.initLinkname("foo", "//go:linkname Printf printf", func(name string) (isVar bool, ok bool) {
return false, name == "Printf"
})
}
func TestErrVarOf(t *testing.T) {