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

Incorrect line number for compiling error when -cover for "go test" #13990

Closed
daviddengcn opened this issue Jan 18, 2016 · 1 comment
Closed

Comments

@daviddengcn
Copy link

go test t.go t_test.go and go test t.go t_test.go -cover show different line numbers for compiling error (12 vs 14) with same error message. Is this expected?

t.go:

package t

import(
  "fmt"
)

func T() {
  fmt.Println("Hello")
}

func b() {
  var i int = ""
}

t_test.go:

package t

import(
  "testing"
)

func Test(t *testing.T) {
}
@ianlancetaylor
Copy link
Member

This is a dup of #6329 . It's a known problem.

@golang golang locked and limited conversation to collaborators Jan 17, 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

3 participants