diff --git a/go/gccgoimporter/parser.go b/go/gccgoimporter/parser.go index e5e4ea91..b09b1376 100644 --- a/go/gccgoimporter/parser.go +++ b/go/gccgoimporter/parser.go @@ -157,7 +157,7 @@ func (p *parser) getPkg(pkgpath, name string) *types.Package { } pkg := p.imports[pkgpath] if pkg == nil && name != "" { - pkg = types.NewPackage(pkgpath, name, types.NewScope(nil)) + pkg = types.NewPackage(pkgpath, name) p.imports[pkgpath] = pkg } return pkg diff --git a/go/importer/import.go b/go/importer/import.go index aee162b1..5e5b320e 100644 --- a/go/importer/import.go +++ b/go/importer/import.go @@ -93,7 +93,7 @@ func (p *importer) pkg() *types.Package { // if the package was imported before, use that one; otherwise create a new one pkg := p.imports[path] if pkg == nil { - pkg = types.NewPackage(path, name, types.NewScope(nil)) + pkg = types.NewPackage(path, name) p.imports[path] = pkg } p.pkgList = append(p.pkgList, pkg)