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: inconsistent acceptance of cyclic variable declaration (esoteric) #25677

Open
griesemer opened this Issue Jun 1, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@griesemer
Contributor

griesemer commented Jun 1, 2018

Another test case for handling of cycle detection:
https://play.golang.org/p/DAftfsYBsrX
is accepted and appears to run correctly. The similar (and functionally identical) program
https://play.golang.org/p/AChHOplAHzp
is not accepted with an incorrect type alias cycle error. And the simplified version eliminating the type name T
https://play.golang.org/p/ozYsLzyDax8
is not accepted with a type checking loop error.

Yet all of them are functionally the same. Either all of them should be accepted or none of them should be accepted.

@griesemer griesemer added this to the Unplanned milestone Jun 1, 2018

@griesemer griesemer self-assigned this Jun 1, 2018

@griesemer

This comment has been minimized.

Contributor

griesemer commented Jun 1, 2018

For reference: gccgo accepts and runs the first two versions. It crashes with the 3rd version (issue #25679).

@go101

This comment has been minimized.

go101 commented Jun 1, 2018

some related? #23823

@griesemer

This comment has been minimized.

Contributor

griesemer commented Jun 1, 2018

@go101 Related in the sense that there are cycles. But there may be different code paths executed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment