go version devel go1.18-1ec51087e5 Thu Nov 11 07:03:15 2021 +0000 linux/amd64
I ran the following code: https://gotipplay.golang.org/p/zJqSyWEKLMD
package main
import "fmt"
type foo int
func main() {
fmt.Printf("%T\n", foo(0))
f := F[foo]{}
fmt.Printf("%T\n", f)
}
type F[T any] struct {
}
It prints:
I'd expect it to print:
main.foo
main.F[main.foo]
i.e. it should report the type parameter string in the same way that it's reported when the type isn't a parameter.
I ran the following code: https://gotipplay.golang.org/p/zJqSyWEKLMD
It prints:
I'd expect it to print:
i.e. it should report the type parameter string in the same way that it's reported when the type isn't a parameter.