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

go/types, types2: missing error for invalid cycle in function declaration #43215

Open
findleyr opened this issue Dec 16, 2020 · 0 comments
Open

go/types, types2: missing error for invalid cycle in function declaration #43215

findleyr opened this issue Dec 16, 2020 · 0 comments
Assignees
Milestone

Comments

@findleyr
Copy link
Contributor

@findleyr findleyr commented Dec 16, 2020

The following invalid cycle is currently detected by the compiler with the error "typechecking loop involving f".

func f([unsafe.Sizeof(f)]int) {}

https://play.golang.org/p/cfAFJHgsAkX

However no error is detected by go/types, both at master and in the dev.typeparams branch (where there have been some changes to cycle detection in function declarations).

CC @griesemer

@griesemer griesemer self-assigned this Dec 16, 2020
@griesemer griesemer added this to the Go1.17 milestone Dec 16, 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.