Open
Description
This comes from a conversation in #32941
The goal of this proposal is to allow easy conversion from a function return to a struct with the same field types and order.
This would allow to more easily pass a function result to a channel, without having to manually create temporary variables and filing them up in a struct before it is sent thorough a channel.
Example :
type Pair struct {
i int
s string
}
func F() (int, string) { ... }
func G() chan {
Pair c := make(chan Pair)
go func() { c <- Pair(F()) }()
return c
}
Like converting between structs, tags should be ignored