On Wed, Feb 28, 2018 at 12:23 PM, Alex Dvoretskiy <advoretski...@gmail.com> wrote: > Hello Golang-nuts > > Why it is not allowed to pass function result like this to return?: > > https://play.golang.org/p/YPeaeW_4WZ6 > > > Or it is allowed without declaring temporary variables i3, i4?
You need to assign the results of the call to f1() to variables that you include in the return. Using a function that returns multiple values in a context where a single value is expected can cause a lot of confusion and is thus not allowed. -- 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.