1
0
mirror of https://github.com/golang/go synced 2024-11-21 16:44:43 -07:00

godoc: fix crash

R=iant, rsc
CC=golang-dev
https://golang.org/cl/5500065
This commit is contained in:
Robert Griesemer 2011-12-21 13:55:47 -08:00
parent f2c9d22850
commit 89c7e206d1

View File

@ -258,7 +258,7 @@ func (doc *docReader) addDecl(decl ast.Decl) {
case *ast.InterfaceType:
fields = typ.Methods
}
if fields == nil {
if fields != nil {
for _, field := range fields.List {
if len(field.Names) == 0 {
// anonymous field