Skip to content

go/types, x/tools/go/ssa: panic: type param without replacement encountered #63260

@josharian

Description

@josharian

Run ssa.(*Program).Build on this module (for us, via govulncheck):

go.mod, does not reproduce with go 1.20:

module z

go 1.21

main.go, simplified from real code:

package main

func main() {
	use(f[*string])
}

func use(fn func() any) {}

func f[I interface{ *T }, T any]() any {
	var z T
	return z
}

Result:

panic: type param without replacement encountered

Reproduced with x/tools v0.13.0 and master as of Sep 27, 2023.

cc @alandonovan

Metadata

Metadata

Labels

FrozenDueToAgeNeedsFixThe 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.release-blocker

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions