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

gccgo: initialization cycle not detected #6684

Closed
griesemer opened this issue Oct 29, 2013 · 1 comment
Closed

gccgo: initialization cycle not detected #6684

griesemer opened this issue Oct 29, 2013 · 1 comment

Comments

@griesemer
Copy link
Contributor

The following program correctly reports an initialization cycle:

http://play.golang.org/p/xdFddyF8P0

Adding an interface type to line 7 (but leaving everything else unchanged) does not
report a cycle anymore:

http://play.golang.org/p/g61QvUmF2O

The spec is vague/incomplete with respect to cycles involving methods, but if a cycle
can be detected in the first case, it should be detectable in the 2nd case. The program
is self-contained and erroneous.

gc has the same bug (issue #6683).
@griesemer
Copy link
Contributor Author

Comment 1:

This is not a bug. It would require more work than what the spec is currently requiring
for detecting this case.
go/types also does not report this.

Status changed to WorkingAsIntended.

@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
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