-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: typed struct name not shown in error #48784
Comments
Thanks for the report, and the repro. This is one of the areas where the I think this is just an oversight where we're taking the underlying and don't need to. I'll send a fix. |
Change https://golang.org/cl/353976 mentions this issue: |
Change https://golang.org/cl/354049 mentions this issue: |
Change https://golang.org/cl/354050 mentions this issue: |
This is port of CL 354049 for types2 to go/type. The change is identical, but for some tweaks to the error message/position in tests, since when go/types reports the exact operation "cannot convert" instead of the general "invalid operation" like types2. Updates #48784 Change-Id: I3e99f2721501d23187fd0a8970eb1de28e0c41d8 Reviewed-on: https://go-review.googlesource.com/c/go/+/354050 Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
Change https://golang.org/cl/354631 mentions this issue: |
This test is currently failing in the longtest builders. I do not know how or why the builders are adding the -G=0 parameter. Updates #48784 Change-Id: I62248d3fbc47567a8c73b4868a2d4aeb0bc47bc3 Reviewed-on: https://go-review.googlesource.com/c/go/+/354631 Trust: Bryan C. Mills <bcmills@google.com> Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: Robert Griesemer <gri@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org>
The old error, using the name and showing the == operation, was clearer.
In the real example I just hit, I had an os.Process instead of T, and the error was showing me the contents of os.Process instead of the name os.Process, which meant very little to me. I wasn't even sure whether it was the contents of os.Process and had to look it up.
/cc @griesemer @findleyr
The text was updated successfully, but these errors were encountered: