]> Cypherpunks repositories - gostls13.git/commit
reflect: prevent additional StructOf embedded method cases
authorIan Lance Taylor <iant@golang.org>
Wed, 27 Jun 2018 21:18:31 +0000 (14:18 -0700)
committerIan Lance Taylor <iant@golang.org>
Wed, 27 Jun 2018 22:04:08 +0000 (22:04 +0000)
commit83092a40ac606d87169fd6d0ee40f20bc93adeaf
tree3285b7258701a028c79730e08611c26743a7f3af
parentd144dd785f06300492754d49fb353ab9d5068919
reflect: prevent additional StructOf embedded method cases

The current implementation does not generate wrappers for methods of
embedded non-interface types. We can only skip the wrapper if
kindDirectIface of the generated struct type matches kindDirectIface
of the embedded type. Panic if that is not the case.

It would be better to actually generate wrappers, but that can be done
later.

Updates #15924
Fixes #24782

Change-Id: I01f5c76d9a07f44e1b04861bfe9f9916a04e65ca
Reviewed-on: https://go-review.googlesource.com/121316
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/reflect/all_test.go
src/reflect/type.go