On Mon, 25 Jul 2016 15:54:02 +0000 Jan Mercl <0xj...@gmail.com> wrote:
> > If T{} is like 42, why “(&T{})" is legal? > > Because > > &T{...} > > is syntactic sugar for > > tmp := T{...} // behind the scenes > &tmp > > and &tmp is an okay receiver in the OP. But by the same logic one could state that &42 should be allowed because behind the scenes it could have been tmp := 42 &tmp So, why this is not allowed for simple types? -- 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.