Skip to content

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

Open
@adonovan

Description

@adonovan
Member
#!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/gopls@v0.17.1 go1.23.3 darwin/arm64 neovim (1)

Dups: LQqDuQ

Activity

added
goplsIssues related to the Go language server, gopls.
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.
on Jan 14, 2025
added this to the Unreleased milestone on Jan 14, 2025
self-assigned this
on Jan 14, 2025
added
BugReportIssues describing a possible bug in the Go implementation.
on Jan 14, 2025
gopherbot

gopherbot commented on Jan 15, 2025

@gopherbot
Contributor

Change https://go.dev/cl/642877 mentions this issue: gopls/internal/golang/completion: debugging missing func def

added a commit that references this issue on Jan 17, 2025
32c4665

6 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @adonovan@gopherbot@findleyr@gabyhelp

      Issue actions

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