]> Cypherpunks repositories - gostls13.git/commit
reflect: special-case panic message when returning Value{} from MakeFunc function
authorKeith Randall <khr@google.com>
Mon, 6 May 2019 19:58:54 +0000 (12:58 -0700)
committerKeith Randall <khr@golang.org>
Mon, 6 May 2019 21:23:29 +0000 (21:23 +0000)
commit04845fe78aeba33106c6f8a40d05e608ca687214
tree16451e229b443d2d846c18b7b44ad99b9972f46b
parent31c4e099158b0e4999c05ee4daf08531f6640ad4
reflect: special-case panic message when returning Value{} from MakeFunc function

Before this CL we used to panic with "nil pointer dereference" because
the value we're calling assignTo on is the zero Value. Provide a better
error message.

Fixes #28748

Change-Id: I7dd4c9e30b599863664d91e78cc45878d8b0052e
Reviewed-on: https://go-review.googlesource.com/c/go/+/175440
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/reflect/value.go
test/fixedbugs/issue28748.go [new file with mode: 0644]