diff --git a/src/pkg/go/doc/doc.go b/src/pkg/go/doc/doc.go index facc92a2a83..52ebda5ea29 100644 --- a/src/pkg/go/doc/doc.go +++ b/src/pkg/go/doc/doc.go @@ -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