On Tuesday, 25 July 2017 09:09:28 UTC-7, Ian Lance Taylor wrote:
>
> On Tue, Jul 25, 2017 at 9:04 AM, nz <notz...@gmail.com <javascript:>> 
> wrote: 
> > 
> > Using reflection I would like to be able to determine if a method has 
> been 
> > promoted (my use case is detecting if a method is overridden). But there 
> > seems to be no way to detect a promoted method. When I use 
> reflect.Method on 
> > the structs I get two separate method definitions, which makes sense 
> given 
> > the way that Go promotes methods. But there must be a way to determine 
> if 
> > the methods are overridden or if they are promoted. Below is some sample 
> > code which demonstrates this. 
> > 
> > https://play.golang.org/p/TTNQQzuuFv 
> > 
> > Am I missing something ? or is it not possible to determine if a method 
> has 
> > been promoted using reflection ? 
>
> As far as I know it is not possible. 
>
> Ian 
>

That makes me a sad panda, 
submitted issue https://github.com/golang/go/issues/21162

Nz

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to