Closed
Description
#!stacks
"runtime.sigpanic" && ("fromReturnStmt:+26" || "fromReturnStmt:+27")
Issue created by stacks.
Oops, the Results field is optional, and in any case NumFields is the correct measure:
if len(funcType.Results.List) != len(ret.Results) {
return nil, fmt.Errorf("%d-operand return statement in %d-result function",
len(ret.Results),
len(funcType.Results.List))
}
This stack ArQqdg
was reported by telemetry:
crash/crash
runtime.gopanic:+69
runtime.panicmem:=262
runtime.sigpanic:+19
golang.org/x/tools/gopls/internal/golang/stubmethods.fromReturnStmt:+26
golang.org/x/tools/gopls/internal/golang/stubmethods.GetIfaceStubInfo:+10
golang.org/x/tools/gopls/internal/golang.quickFix:+44
golang.org/x/tools/gopls/internal/golang.CodeActions:+65
golang.org/x/tools/gopls/internal/server.(*server).CodeAction:+154
golang.org/x/tools/gopls/internal/protocol.serverDispatch:+160
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.0-pre.2 go1.23.3 darwin/arm64 other (5)
Metadata
Metadata
Assignees
Labels
Type
Projects
Relationships
Development
No branches or pull requests
Activity
gabyhelp commentedon Dec 23, 2024
Related Issues
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
adonovan commentedon Dec 23, 2024
I think this was fixed in passing by https://go.dev/cl/623156 which changed it to:
adonovan commentedon Dec 30, 2024
Presumed fixed, closing.