From 49eaa56ed197df94ae3f86bc28950cc2b8ac2b75 Mon Sep 17 00:00:00 2001 From: Alan Donovan Date: Thu, 20 Feb 2014 20:11:00 -0500 Subject: [PATCH] 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 --- go/gccgoimporter/parser.go | 2 +- go/importer/import.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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)