Skip to content

Commit b2aec62

Browse files
committed
fix:unexpected gop overload completion in go
1 parent ab79a37 commit b2aec62

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

gopls/internal/lsp/source/completion/deep_completion.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"strings"
1111
"time"
1212

13+
"github.com/goplus/gogen"
1314
"github.com/qiniu/x/log"
1415
"golang.org/x/tools/gopls/internal/goxls"
1516
)
@@ -138,7 +139,11 @@ func (c *completer) deepSearch(ctx context.Context, start time.Time, deadline *t
138139
if obj == nil {
139140
continue
140141
}
141-
142+
if sig, ok := obj.Type().(*types.Signature); ok { //goxls:skip gop overload
143+
if _, ok := gogen.CheckSigFuncEx(sig); ok {
144+
continue
145+
}
146+
}
142147
// At the top level, dedupe by object.
143148
if len(cand.path) == 0 {
144149
if c.seen[obj] {

0 commit comments

Comments
 (0)