1
0
mirror of https://github.com/golang/go synced 2024-11-18 23:24:39 -07:00

go.tools/go/types: internal cleanup - nil out objmap when done with it

Also: print package path with quotes.

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/55520046
This commit is contained in:
Robert Griesemer 2014-01-28 12:56:33 -08:00
parent ebfa4efbc4
commit 7dbf7c000d
2 changed files with 2 additions and 1 deletions

View File

@ -50,5 +50,5 @@ func (pkg *Package) Imports() []*Package { return pkg.imports }
func (pkg *Package) SetImports(list []*Package) { pkg.imports = list }
func (pkg *Package) String() string {
return fmt.Sprintf("package %s (%s)", pkg.name, pkg.path)
return fmt.Sprintf("package %s (%q)", pkg.name, pkg.path)
}

View File

@ -388,6 +388,7 @@ func (check *checker) resolveFiles(files []*ast.File) {
check.objDecl(obj, nil, false)
}
}
check.objMap = nil // not needed anymore
// At this point we may have a non-empty check.methods map; this means that not all
// entries were deleted at the end of typeDecl because the respective receiver base