Closed
Description
#!stacks
"runtime.typeAssert" && "completion.(*completer).item:+33"
Issue created by stacks.
if isTypeName(obj) && c.wantTypeParams() {
// obj is a *types.TypeName, so its type must be Alias|Named.
tparams := typesinternal.TypeParams(obj.Type().(typesinternal.NamedOrAlias))
label += typesutil.FormatTypeParams(tparams)
insert = label // maintain invariant above (label == insert)
}
This stack kzwYeg
was reported by telemetry:
crash/crash
runtime.gopanic:+69
runtime.getitab:+58
runtime.typeAssert:+7
golang.org/x/tools/gopls/internal/golang/completion.(*completer).item:+33
golang.org/x/tools/gopls/internal/golang/completion.(*completer).addCandidate:+44
golang.org/x/tools/gopls/internal/golang/completion.(*completer).deepSearch:+71
golang.org/x/tools/gopls/internal/golang/completion.Completion:+158
golang.org/x/tools/gopls/internal/server.(*server).Completion:+19
golang.org/x/tools/gopls/internal/protocol.serverDispatch:+193
golang.org/x/tools/gopls/internal/lsprpc.(*streamServer).ServeStream.ServerHandler.func3:+5
golang.org/x/tools/gopls/internal/lsprpc.(*streamServer).ServeStream.handshaker.func4:+52
golang.org/x/tools/gopls/internal/protocol.Handlers.MustReplyHandler.func1:+2
golang.org/x/tools/gopls/internal/protocol.Handlers.AsyncHandler.func2.2:+3
runtime.goexit:+0
golang.org/x/tools/gopls@v0.17.1 go1.23.4 darwin/arm64 other,vscode (5)
Metadata
Metadata
Assignees
Labels
Type
Projects
Relationships
Development
No branches or pull requests
Activity
gabyhelp commentedon Dec 27, 2024
Related Issues
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
adonovan commentedon Jan 7, 2025
See amap.zip for a repro test case, courtesy of @qiulaidongfeng.
findleyr commentedon Jan 15, 2025
@qiulaidongfeng do you recall exactly what you were completing when you encountered this crash?
16 remaining items