]> Cypherpunks repositories - gostls13.git/commit
reflect: name interface type that pins method info
authorDavid Crawshaw <crawshaw@golang.org>
Fri, 25 Mar 2016 15:03:47 +0000 (11:03 -0400)
committerDavid Crawshaw <crawshaw@golang.org>
Fri, 25 Mar 2016 17:19:03 +0000 (17:19 +0000)
commit8cb74e1d1812caee1705eef94272c959911ee9b3
tree1fe6b4c0e2a32e16fe15911203545b7a3942c1d8
parent6b0688f7421aeef904d40a374bae75c37ba0b8b4
reflect: name interface type that pins method info

I recently added TestUnexportedMethods which uses an interface type
to pin type information for an unexported method. But as written,
the interface type is not accessible to the reflect package.

You can imagine a future compiler optimization realizing that and
removing the type information for f. In fact, cl/20901 happens to
do that.

Change-Id: I1ddb67f50cb9b5737253b58f10545f3de652c29d
Reviewed-on: https://go-review.googlesource.com/21112
Reviewed-by: Michel Lespinasse <walken@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/reflect/all_test.go