printnil.go
329 Bytes
-
compiler: check for nil receiver in value method · 22149e37
We already dereference the pointer to copy the value, but if the method does not use the value then the pointer dereference may be optimized away. Do an explicit nil check so that we get the panic that is required. Fixes golang/go#19806 Reviewed-on: https://go-review.googlesource.com/91275 * go.go-torture/execute/printnil.go: New test. From-SVN: r257280
Ian Lance Taylor committed