-
Notifications
You must be signed in to change notification settings - Fork 18k
go/types: assertion failed error on type declaration cycle #18643
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
Labels
Milestone
Comments
CL https://golang.org/cl/46393 mentions this issue. |
gopherbot
pushed a commit
that referenced
this issue
Jun 22, 2017
Not a fix but useful for further debugging, and safe. For #18643. Change-Id: I5fb4f4a8662007a26e945fff3986347855f00eab Reviewed-on: https://go-review.googlesource.com/46393 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
CL https://golang.org/cl/46467 mentions this issue. |
Change https://golang.org/cl/112275 mentions this issue: |
Change https://golang.org/cl/115456 mentions this issue: |
gopherbot
pushed a commit
that referenced
this issue
May 31, 2018
To evaluate the type of composite literals, the type checker called Checker.typ which breaks cycles. As a result, certain cycles were not reported with actual cycle reporting, but caught due to other uninitialized fields (with less nice error message). The change now calls Checker.typExpr at the relevant call site. For #18643. Change-Id: Iecb3f0e1afb4585b85553b6c581212f52ac3a1c4 Reviewed-on: https://go-review.googlesource.com/115456 Reviewed-by: Alan Donovan <adonovan@google.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Running gotype on this code fails with an assertion failed panic:
Notably, go/types does accept this code (even though cmd/compile and gccgo report errors):
Related: #13890
/cc @griesemer
The text was updated successfully, but these errors were encountered: