-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
Description
Checking a file with a struct definition that makes use of non-existent types causes a nil pointer dereference. What steps will reproduce the problem? If possible, include a link to a program on play.golang.org. 1. Download attached files demo.go and broken.go into the same directory 2. go run demo.go 3. What is the expected output? Expected handling of the error, not an internal panic What do you see instead? INTERNAL PANIC: runtime error: invalid memory address or nil pointer dereference (See attached log for complete stacktrace) Which compiler are you using (5g, 6g, 8g, gccgo)? 6g Which operating system are you using? Which version are you using? (run 'go version') go version devel +56909cb770fe Fri Jun 21 18:07:57 2013 -0700 linux/amd64 Please provide any additional information below. In (*checker).callExpr, x.typ can be nil, which will cause typ to be nil. isUntyped(nil) results in t, ok := typ.Underlying().(*Basic) and that's trying to call Underlying() on nil.
Attachments: