// expected: missing return // // A function with results must end in a terminating statement. go/types // rejects the body below on the legacy side; stage4 compiled it and returned // the zero value, so a forgotten return path was accepted on one side only. // The rules are the Go spec's terminating statements, the same ones go/types // applies in return.go. package main func f() (r int32) { if false { return 1 } } func main() { println(f()) }