]> Cypherpunks repositories - gostls13.git/commit
go/types: include package import path in NamedType.String().
authorAlan Donovan <adonovan@google.com>
Tue, 19 Feb 2013 19:42:05 +0000 (14:42 -0500)
committerAlan Donovan <adonovan@google.com>
Tue, 19 Feb 2013 19:42:05 +0000 (14:42 -0500)
commita17c46169f59579788d0ffb82eab875e4f15fc00
tree48a73a965fc3b9d585be29810452b76fa8f3c9ee
parent5c3fb96be957c6bf3199d6d460de11b2ba5093eb
go/types: include package import path in NamedType.String().

This avoids ambiguity and makes the diagnostics closer to
those issued by gc, but it is more verbose since it qualifies
intra-package references.

Without extra context---e.g. a 'from *Package' parameter to
Type.String()---we are forced to err on one side or the other.

Also, cosmetic changes to exp/ssa:
- Remove package-qualification workaround in Function.FullName.
- Always set go/types.Package.Path field to the import path,
  since we know the correct path at this point.
- In Function.DumpTo, show variadic '...' and result type info,
  and delete now-redundant "# Type: " line.

R=gri
CC=golang-dev
https://golang.org/cl/7325051
src/pkg/exp/ssa/builder.go
src/pkg/exp/ssa/func.go
src/pkg/go/types/errors.go