go: cmd/compile: local type declarations in generic code don't work

package main

func F[T1 any]() {
	type x struct{}
}
func main() {
}
$ go run -gcflags=-G=3 tmp1.go
# command-line-arguments
<unknown line number>: internal compiler error: cannot export DCLTYPE (50) node

This looks like a general problem that we can’t export/import local type declarations, including for inlining.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (9 by maintainers)

Commits related to this issue

Most upvoted comments

IMO this issue should be labeled as release-blocker, local type declarations are fairly common.