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

cmd/go2go: missing type cycle error #39938

Closed
griesemer opened this issue Jun 30, 2020 · 2 comments
Closed

cmd/go2go: missing type cycle error #39938

griesemer opened this issue Jun 30, 2020 · 2 comments
Assignees
Milestone

Comments

@griesemer
Copy link
Contributor

@griesemer griesemer commented Jun 30, 2020

type base(type T) struct{
        pointer T
}

type foo struct { // <<< should get a cycle error here
        _ (base(foo))
}

type foo2 struct { // <<< correctly reporting illegal cycle in declaration of foo2
	_ struct{
       		pointer foo2
	}
}

Found as part of #39901.

@griesemer griesemer added this to the Unreleased milestone Jun 30, 2020
@griesemer griesemer self-assigned this Jun 30, 2020
@griesemer griesemer changed the title cmd/go2go: unexpected type cycle error cmd/go2go: missing type cycle error Jun 30, 2020
@gopherbot
Copy link

@gopherbot gopherbot commented Jun 30, 2020

Change https://golang.org/cl/240519 mentions this issue: [dev.go2go] go/types: report "inifinite expansion" cycles across instantiated types

gopherbot pushed a commit that referenced this issue Jun 30, 2020
…antiated types

Fixes #39938.

Change-Id: I482b211189cefdc098df5acb4f858f6f1635ce60
Reviewed-on: https://go-review.googlesource.com/c/go/+/240519
Reviewed-by: Robert Griesemer <gri@golang.org>
@griesemer
Copy link
Contributor Author

@griesemer griesemer commented Jun 30, 2020

Fixed in dev.go2go.

@griesemer griesemer closed this Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.