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

@findleyr findleyr commented Sep 23, 2021

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

@gopherbot gopherbot commented Sep 23, 2021

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

Loading

@gopherbot gopherbot closed this in 13f3c57 Sep 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants