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
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@griesemer
Copy link
Contributor

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 the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jun 30, 2020
@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

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

Fixed in dev.go2go.

@golang golang locked and limited conversation to collaborators Jun 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

2 participants