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

cmd/compile: "F is not a generic type" when F is a recursive generic interface #47836

Closed
4ad opened this issue Aug 20, 2021 · 4 comments
Closed

cmd/compile: "F is not a generic type" when F is a recursive generic interface #47836

4ad opened this issue Aug 20, 2021 · 4 comments

Comments

@4ad
Copy link
Member

@4ad 4ad commented Aug 20, 2021

On tip (e9e0d1e) with -gcflags=-G=3

Repro:

package p

type F[t F[t]] interface {}

Compiler rejects it with:

go build -gcflags=-G=3 j.go
# command-line-arguments
./j.go:3:10: F is not a generic type

However, it accepts this:

package p

type F[t F] interface {}

But that has other problems, see #47837.

@mknyszek
Copy link
Contributor

@mknyszek mknyszek commented Aug 20, 2021

Loading

@tdakkota
Copy link

@tdakkota tdakkota commented Aug 20, 2021

Seems like duplicate of #47796

Loading

@4ad
Copy link
Member Author

@4ad 4ad commented Aug 20, 2021

Yep, seems like a dupe. In fact, I was trying to write that exact Eq when I found this.

Loading

@mknyszek
Copy link
Contributor

@mknyszek mknyszek commented Aug 20, 2021

Closing as duplicate of #47796.

Loading

@mknyszek mknyszek closed this Aug 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants