mirror of
https://github.com/golang/go
synced 2025-05-05 03:21:36 +00:00
cmd/gc: implement new return requirements
Fixes #65. R=ken2 CC=golang-dev https://golang.org/cl/7441049
This commit is contained in:
@ -6,12 +6,12 @@
|
||||
|
||||
package main
|
||||
|
||||
func f() int { // ERROR "return|control"
|
||||
func f() int { // GCCGO_ERROR "control"
|
||||
if false {
|
||||
return 0;
|
||||
}
|
||||
// we should not be able to return successfully w/o a return statement
|
||||
}
|
||||
} // GC_ERROR "return"
|
||||
|
||||
func main() {
|
||||
print(f(), "\n");
|
||||
|
Reference in New Issue
Block a user