go.tools/go/*: fix breakage caused by removal of types.NewPackage parameter.

(This fixes the build, but one test is failing.)

TBR=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/66730043
This commit is contained in:
Alan Donovan 2014-02-20 20:11:00 -05:00
parent 01263f0a00
commit 49eaa56ed1
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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)