On Wednesday, 7 September 2016 15:59:50 UTC+1, Jan Mercl wrote:
>
> On Wed, Sep 7, 2016 at 4:42 PM T L <tapi...@gmail.com <javascript:>> 
> wrote:
>
> See https://golang.org/ref/spec#Selectors and explain why do you think a 
> clash should happen.
> -- 
>
> -j
>

More specifically this (in the spec)

"For a value x of type T or *T where T is not a pointer or interface type, 
x.f denotes the field or method at the shallowest depth in T where there is 
such an f."


Covers the above behaviour 

and (from the same section)

" If there is not exactly one f with shallowest depth, the selector 
expression is illegal."


is not the case here - so works..

Thanks for bringing this up - is actually quite an obscure point. 

-- 
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