If an expression in a return modifies an earlier result parameter, does the Go language spec guarantee the new value will be returned?

3 weeks ago 12
ARTICLE AD BOX

For example, does the Go language spec guarantee the following will print true?

https://go.dev/play/p/Rybua4uBb87

package main import "fmt" func main() { fmt.Println(modify_result_parameter_after_return()) } func modify_result_parameter_after_return() (b bool, _ error) { return b, set(&b) } func set(b *bool) error { *b = true return nil }
Read Entire Article