Skip to content

go/types: failed genericType assertion in Checker.instantiatedType #71198

@adonovan

Description

@adonovan
#!stacks
"runtime.typeAssert" && "go/types.(*Checker).instantiatedType:+38"

Issue created by stacks.

func (check *Checker) instantiatedType(ix *indexedExpr, def *TypeName) (res Type) {
...
	// create instance
	// The instance is not generic anymore as it has type arguments, but it still
	// satisfies the genericType interface because it has type parameters, too.
	inst := check.instance(ix.Pos(), gtyp, targs, nil, check.context()).(genericType)

This stack aEVlDg was reported by telemetry:

golang.org/x/tools/gopls@v0.17.1 go1.24rc1 linux/amd64 vscode (10)

cc: @griesemer @findleyr

Dups: HNc-0g sRb2ZQ caAKMA ubM70w f0cr5w -B6Zow aGFSSA OhNcBw sk-sbA Fv9t1w

Metadata

Metadata

Assignees

Labels

NeedsFixThe path to resolution is known, but the work has not been done.ToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.gopls/telemetry-winsrelease-blocker

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions