You are not alone. https://github.com/golang/go/issues/15209
On Saturday, June 3, 2017 at 4:13:03 PM UTC-7, Conrad Irwin wrote: > > Hey nuts! > > I ran into the following confusion today: > https://play.golang.org/p/XH8wyj6IbT. > > Consulting the golang spec, I think this is correct. `If the final > argument is assignable to a slice type []T, it may be passed unchanged as > the value for a ...T parameter if the argument is followed by .... In this > case no new slice is created.`, but I was definitely expecting the ... to > act as though I'd typed out each element of the array. > > Would it be reasonable to update the language to allow > > func A (a... T) { } > b := make([]S) > A(b...) > > if S is assignable to T (rather than the current rule, which is only if > []S is assignable to []T) > > Conrad > -- 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.