Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go/types, types2: embedded field type cannot be a (pointer to a) type parameter #48334

zllangct opened this issue Sep 11, 2021 · 1 comment


Copy link

@zllangct zllangct commented Sep 11, 2021

What version of Go are you using (go version)?

$ go version
go version devel go1.18-23832ba2e2 Sat Sep 11 05:05:56 2021 +0000 darwin/amd64

What did you do?

package main

type A[T any] struct {

func main(){

What did you expect to see?


What did you see instead?

// go2go playground is ok, something wrong here
# command-line-arguments
./main1.go:4:2: embedded field type cannot be a (pointer to a) type parameter
Copy link

@fzipp fzipp commented Sep 11, 2021

This works as intended, see #43621. The go2go playground is outdated.


@cuonglm cuonglm closed this Sep 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants