What version of Go are you using (go version)?
$ go version
go version devel +f376b8510e Fri Jan 3 01:36:26 2020 +0000 linux/amd64
Does this issue reproduce with the latest release?
Yes.
What did you do?
Compile:
package main
import (
"fmt"
)
func f1(a int) {
fmt.Printf("a: %d\n", a)
}
func main() {
a := 1
f := func() {
f1(a)
}
f()
}
check the DW_AT_decl_line attribute of the variable a in main.main.func1
What did you expect to see?
line 12
What did you see instead?
line 14 (the first use of a inside the closure).
What version of Go are you using (
go version)?Does this issue reproduce with the latest release?
Yes.
What did you do?
Compile:
check the DW_AT_decl_line attribute of the variable
ain main.main.func1What did you expect to see?
line 12
What did you see instead?
line 14 (the first use of
ainside the closure).