Commit e3779219 authored by Robert Griesemer's avatar Robert Griesemer

go/doc: set Type.Name field

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5569043
parent 57007fe1
......@@ -483,7 +483,7 @@ func (p sortType) Less(i, j int) bool {
// sort by name
// pull blocks (name = "") up to top
// in original order
if ni, nj := p[i].Type.Name.Name, p[j].Type.Name.Name; ni != nj {
if ni, nj := p[i].Name, p[j].Name; ni != nj {
return ni < nj
}
return p[i].order < p[j].order
......@@ -509,6 +509,7 @@ func (doc *docReader) makeTypes(m map[string]*typeInfo) []*Type {
// process the type even if not exported so that we have
// its methods in case they are embedded somewhere
t := new(Type)
t.Name = old.name
if decl != nil {
typespec := decl.Specs[0].(*ast.TypeSpec)
doc := typespec.Doc
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment