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

cmd/compile: bad line numbers in error messages #14520

Closed
mdempsky opened this issue Feb 26, 2016 · 1 comment
Closed

cmd/compile: bad line numbers in error messages #14520

mdempsky opened this issue Feb 26, 2016 · 1 comment

Comments

@mdempsky
Copy link
Member

For this (rather contrived) test case:

$ cat -n /tmp/repro.go
     1  package f
     2  import `
     3  bogus`
     4  func f(x int /*
     5
     6  */)
$ go tool compile /tmp/repro.go 
/tmp/repro.go:3: import path contains control character: "\nbogus"
/tmp/repro.go:5: syntax error: unexpected semicolon or newline, expecting comma or )

The error messages should be at lines 2 and 4, respectively.

(The second error message has been wrong at least since 1.5.3.)

@mdempsky mdempsky self-assigned this Feb 26, 2016
@gopherbot
Copy link

CL https://golang.org/cl/19934 mentions this issue.

@golang golang locked and limited conversation to collaborators Feb 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants