]> Cypherpunks repositories - gostls13.git/commit
reflect: clear ptrToThis in Ptr when allocating result on heap
authorMichael Hudson-Doyle <michael.hudson@canonical.com>
Fri, 10 Feb 2017 00:08:13 +0000 (13:08 +1300)
committerRuss Cox <rsc@golang.org>
Fri, 10 Feb 2017 17:22:07 +0000 (17:22 +0000)
commit066ac428cdcb0b220a8a58f31c884d054cecd118
tree63589b2c46958dcd67482dd9d8f40ce9fb1c14e2
parent78e6abd244eb4f75180fdb3bc72d69a2f471feca
reflect: clear ptrToThis in Ptr when allocating result on heap

Otherwise, calling PtrTo on the result will fail.

Fixes #19003

Change-Id: I8d7d1981a5d0417d5aee52740469d71e90734963
Reviewed-on: https://go-review.googlesource.com/36731
Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
src/reflect/all_test.go
src/reflect/type.go