summaryrefslogtreecommitdiff
path: root/src/pkg/go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/go')
-rw-r--r--src/pkg/go/ast/filter.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/go/ast/filter.go b/src/pkg/go/ast/filter.go
index 1c2aea357..4e2060303 100644
--- a/src/pkg/go/ast/filter.go
+++ b/src/pkg/go/ast/filter.go
@@ -293,7 +293,7 @@ func MergePackageFiles(pkg *Package, complete bool) *File {
name := f.Name.Name()
if j, exists := funcs[name]; exists {
// function declared already
- if decls[j].(*FuncDecl).Doc == nil {
+ if decls[j] != nil && decls[j].(*FuncDecl).Doc == nil {
// existing declaration has no documentation;
// ignore the existing declaration
decls[j] = nil