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: using unexported identifier causes case mismatch suggestion #25727
Comments
Why? http.Server does have a doneChan. |
Are you asking why the error message wrong? It's wrong because:
|
A couple variations: https://play.golang.org/p/eDHDcSIeCGa
|
Not urgent. |
Change https://golang.org/cl/117755 mentions this issue: |
Thank you for the report @willfaught, thank you for the investigation and ping @FiloSottile and thanks @fraenkel and @griesemer for taking a look too. I hadn't seen, I've been quite swamped but I just got a chance to take a look at it and I've mailed a CL, PTAL. |
Ensure that compiler error suggestions after case insensitive field lookups don't mistakenly reported unexported fields if those fields aren't in the local package being processed. Fixes golang#25727 Change-Id: Icae84388c2a82c8cb539f3d43ad348f50a644caa Reviewed-on: https://go-review.googlesource.com/117755 Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com> Reviewed-by: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Sorry if this is a dupe. GitHub phrase searches for "unknown field" or "but does have" seem to not return exact matches right now.
What did you do?
https://play.golang.org/p/Kk_EIikQW8M
What did you expect to see?
What did you see instead?
This seems to be hitting code that mistakenly thinks there's a case mismatch, where I typed "doneChan" but really meant "DoneChan", or vice versa. This was very confusing and took about 10 minutes to understand (in a more complex context on my machine).
The text was updated successfully, but these errors were encountered: