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?
to your account
A3/* ERROR cycle */ A4
check_test.go:271: /Users/gri/tmp/c.go:40:2: illegal cycle in declaration of A3
check_test.go:271: /Users/gri/tmp/c.go:40:2: A3 refers to
check_test.go:271: /Users/gri/tmp/c.go:41:2: A4 refers to
check_test.go:271: /Users/gri/tmp/c.go:40:2: A3
which seems misleading. This is due to the fact that type A4 A2 resolves to type A4 A3. Note that cmd/compile does the same.
type A4 A2
type A4 A3
We could possibly report the cycle starting at A2 if we were to keep an additional link with each defined type, next to the resolved, underlying type.
This is a UX improvement.
The text was updated successfully, but these errors were encountered:
Change https://golang.org/cl/199937 mentions this issue: go/types: don't skip defined types when reporting cycles
go/types: don't skip defined types when reporting cycles
Sorry, something went wrong.
Successfully merging a pull request may close this issue.