patch sync/atomic; typepatch fix (don't change types)
This commit is contained in:
10
cl/import.go
10
cl/import.go
@@ -127,14 +127,22 @@ func pkgKindByScope(scope *types.Scope) (int, string) {
|
||||
}
|
||||
|
||||
func (p *context) importPkg(pkg *types.Package, i *pkgInfo) {
|
||||
pkgPath := llssa.PathOf(pkg)
|
||||
scope := pkg.Scope()
|
||||
kind, _ := pkgKindByScope(scope)
|
||||
if kind == PkgNormal {
|
||||
if alt, ok := p.patches[pkgPath]; ok {
|
||||
pkg = alt.Pkg
|
||||
scope = pkg.Scope()
|
||||
if kind, _ = pkgKindByScope(scope); kind != PkgNormal {
|
||||
goto start
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
start:
|
||||
i.kind = kind
|
||||
fset := p.fset
|
||||
pkgPath := llssa.PathOf(pkg)
|
||||
names := scope.Names()
|
||||
syms := newPkgSymInfo()
|
||||
for _, name := range names {
|
||||
|
||||
Reference in New Issue
Block a user