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
What steps will reproduce the problem?
1. Compile this program
func main() {
fmt.Printf("String: %s, Int: %d\n", multipleReturnValues())
}
func multipleReturnValues() (s string, i int) {
return `String`, 10
}
What is the expected output?
String: String, Int: 10
What do you see instead?
Compile error:
multiple-value multipleReturnValues() in single-value context
cannot use multipleReturnValues() as type interface { } in function argument
What is your $GOOS? $GOARCH?
linux, amd64
Which revision are you using? (hg identify)
14 July Release
Please provide any additional information below.
It might be difficult to implement, but logically the compiler should know that the
function returns multiple values and pass them as separate arguments to Printf.