Skip to content

x/tools/gopls: failed *types.Func type assertion in populateCommentCompletions #71273

@adonovan

Description

@adonovan
#!stacks
"panicdottypeI" && "populateCommentCompletions:+84" ||
// post CL 642877:
"bug.Reportf" && "populateCommentCompletions.func1:=1086" && "populateCommentCompletions:+98"

Issue created by stacks.

		case *ast.FuncDecl:
			c.addFieldItems(node.Recv)
			c.addFieldItems(node.Type.Params)
			c.addFieldItems(node.Type.Results)

			// collect receiver struct fields
			if node.Recv != nil {
				sig := c.pkg.TypesInfo().Defs[node.Name].(*types.Func).Signature() // <-- type assert failed

Very similar to #70889.

This stack QTs-mg was reported by telemetry:

golang.org/x/tools/[email protected] go1.23.3 darwin/arm64 neovim (1)

Dups: LQqDuQ

Metadata

Metadata

Assignees

Labels

BugReportIssues describing a possible bug in the Go implementation.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.ToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.gopls/telemetry-wins

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions