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:
parent
ebfa4efbc4
commit
7dbf7c000d
@ -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)
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user