#!stacks
"inlineAllCalls:+120" && "bug.Errorf"
Issue created by stacks.
// Sanity check.
if obj := refpkg.TypesInfo().ObjectOf(name); obj == nil ||
obj.Name() != origDecl.Name.Name ||
obj.Pkg() == nil ||
obj.Pkg().Path() != string(pkg.Metadata().PkgPath) {
return nil, bug.Errorf("cannot inline: corrupted reference %v", ref)
}
This stack e_6wqw
was reported by telemetry:
gopls/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35
golang.org/x/tools/gopls/internal/util/bug.Errorf:+2
golang.org/x/tools/gopls/internal/golang.inlineAllCalls:+120
golang.org/x/tools/gopls/internal/golang.rewriteCalls:+118
golang.org/x/tools/gopls/internal/golang.ChangeSignature:+142
golang.org/x/tools/gopls/internal/server.(*commandHandler).ChangeSignature.func1:+15
golang.org/x/tools/gopls/internal/server.(*commandHandler).run.func2:+3
golang.org/x/tools/gopls/internal/server.(*commandHandler).run:+81
golang.org/x/tools/gopls/internal/server.(*commandHandler).ChangeSignature:+2
golang.org/x/tools/gopls/internal/protocol/command.Dispatch:+45
golang.org/x/tools/gopls/internal/server.(*server).ResolveCodeAction:+21
golang.org/x/tools/gopls/internal/protocol.serverDispatch:+46
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
golang.org/x/tools/gopls@v0.18.1 go1.24.3 darwin/arm64 vscode (1)
Comment From: gabyhelp
Related Issues
- x/tools/gopls: "inline: corrupted reference %v" bug in golang.RemoveUnusedParameter #69896 (closed)
- x/tools/gopls: ChangeSignature: crash in in inliner (likely due to ill-formed variadic call) #73187
- x/tools/internal/refactor/inline: panic in needsParens #71486 (closed)
- x/tools/gopls: "edit does not belong to syntax of package %q" bug in golang.Rename #70049 (closed)
- x/tools/gopls: Rename: crash due to Info.Defs[id]=nil bug in checkStructField #70968 (closed)
- x/tools/gopls: SignatureHelp bug reported by telemetry [_mSPWg] #64234 (closed)
- x/tools/gopls: nil Signature (?) deref in Completion #70634 (closed)
- x/tools/gopls: nil deref in Snapshot.MetadataForFile #73114
- x/tools/gopls: crash during SignatureHelp #40230 (closed)
- x/tools/gopls: bug: load.go:185: go/packages returned unexpected package "golang.org/x/tools/go/callgraph/cha/testdata/iface.go.~master~" for standalone file #69331 (closed)
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)