On Fri, 13 Oct 2017, at 02:02 PM, Ian Davis wrote:
> On Fri, 13 Oct 2017, at 01:41 PM, Cholerae Hu wrote:
>> https://golang.org/ref/spec#Calls
>>> If x is addressable[1] and &x's method set contains m, x.m() is
>>> shorthand for (&x).m()>>
>> https://golang.org/ref/spec#Address_operators
>> Composite literals is addressable.
>>
>> So why can't I call DummyMethod like Circle{radius:
>> 1.0}.DummyMethod() ?>
> It works on the playground: https://play.golang.org/p/kP9emNKWeg
>
> Ian
Sorry, I misread your question.
Links:
1. https://golang.org/ref/spec#Address_operators
--
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.