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: cycles through unions are not detected #48582

Closed
findleyr opened this issue Sep 23, 2021 · 1 comment
Closed

go/types,types2: cycles through unions are not detected #48582

findleyr opened this issue Sep 23, 2021 · 1 comment

Comments

@findleyr
Copy link
Contributor

The following invalid code type-checks cleanly:

type N interface {
  int | N
}

We need to scan Unions when detecting cycles (Checker.validType).

CC @griesemer

@gopherbot
Copy link

Change https://golang.org/cl/351829 mentions this issue: go/types,types2: disallow illegal cycles through Unions

@golang golang locked and limited conversation to collaborators Sep 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants