You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
go version go1.8.3 linux/amd64
What did you do?
package main
import"fmt"funcf1() ([]int, int, int) {
returnnil, 1, 2
}
funcf2() (int, int) {
return1, 2
}
funcmain() {
// function call nesting is ok.fmt.Println(f2())
vars []int// function call nesting is ok.s=append(f1())
_=s// function call nestings are not ok.println(f2()) // multiple-value f2() in single-value contextprint(f2()) // multiple-value f2() in single-value context
}
What did you expect to see?
compile okay.
What did you see instead?
compile failed.
The text was updated successfully, but these errors were encountered:
mvdan
changed the title
inconsisten behavior for builtin functions print and println
builtin: print and println do not accept multiple-value expressions like fmt.Println and others
Jun 13, 2017
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.8.3 linux/amd64
What did you do?
What did you expect to see?
compile okay.
What did you see instead?
compile failed.
The text was updated successfully, but these errors were encountered: