We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 version
$ go version go version devel +f376b8510e Fri Jan 3 01:36:26 2020 +0000 linux/amd64
Yes.
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
a
line 12
line 14 (the first use of a inside the closure).
The text was updated successfully, but these errors were encountered:
Note: this is not a regression.
Sorry, something went wrong.
Change https://golang.org/cl/214637 mentions this issue: cmd/compile: assign correct declaration line to DIE of captured vars
cmd/compile: assign correct declaration line to DIE of captured vars
363cd66
No branches or pull requests
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
a
in main.main.func1What did you expect to see?
line 12
What did you see instead?
line 14 (the first use of
a
inside the closure).The text was updated successfully, but these errors were encountered: