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: no file/line info for init function #8777
Labels
Milestone
Comments
@dr2chase possibility |
rsc
changed the title
cmd/gc: no file/line info for init function
cmd/compile: no file/line info for init function
Jun 8, 2015
Too late for Go 1.5. |
I don't think this is an issue anymore btw $ go version
go version devel +be91515 Thu Jul 28 03:03:42 2016 +0000 darwin/amd64
$ go run main.go
panic: nil
goroutine 1 [running]:
panic(0x562c0, 0xc42000a0e0)
/Users/emmanuelodeke/go/src/go.googlesource.com/go/src/runtime/panic.go:500 +0x1a1
_/Users/emmanuelodeke/Desktop/openSrc/bugs/golang/8777/a.foo(0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/Users/emmanuelodeke/Desktop/openSrc/bugs/golang/8777/a/1.go:4 +0x8a
_/Users/emmanuelodeke/Desktop/openSrc/bugs/golang/8777/a.init()
/Users/emmanuelodeke/Desktop/openSrc/bugs/golang/8777/a/2.go:2 +0xb8
main.init()
/Users/emmanuelodeke/Desktop/openSrc/bugs/golang/8777/main.go:5 +0x2e
exit status 2 init has the line information Given your setup @dvyukov $ ls -lrth
total 8
drwxr-xr-x 4 emmanuelodeke staff 136B 28 Jul 03:04 a
-rw-r--r-- 1 emmanuelodeke staff 55B 28 Jul 03:05 main.go
find . -type f -exec cat {} \;
// a/1.go
package a
func foo(i interface{}, c1 complex64, c2 complex128) int {
if i == nil {
panic("nil")
}
return 0
}
func bar(b bool, s string, c byte, i int) (interface{}, complex64, complex128) {
if b {
panic("nil")
}
return nil, 0, 0
}
// a/2.go
package a
var X = foo(bar(false, "foo", byte(0), 1))
// main.go
package main
import _ "./a"
func main() {
} |
Will close then, thanks! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: