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/printer: Source position broken #5945
Comments
I'm running into a similar issue. But, I'm not sure if it is really related to this particular issue. I have an undeclared identifier in line 72 of my go source file and cgo error notice is giving me line 38. Darwin grinch-2.local 13.0.0 Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64 go version go1.2rc3 darwin/amd64 |
Owner changed to @griesemer. |
Look into this and decide if this is fixed/needs a fix. At the very least the 2nd issue in the initial bug report looks like a programmer error: Inserting a new identifier w/o setting its position is not going to give a correct position. |
Follow-up regarding the 2nd issue: This is clearly a programmer error. It's not clear what you're trying to do with:
If you just want to change the name, simply do:
Then the //line for the call is correct. Looking into the first issue now (spurious //line comments before empty lines). |
The first issue is clearly a bug in go/printer. Fix forthcoming. |
CL https://golang.org/cl/44651 mentions this issue. |
by tobias.schwerdtfeger:
The text was updated successfully, but these errors were encountered: