2012-02-17 04:49:30 +00:00
|
|
|
// errorcheck
|
2008-08-06 17:02:18 +00:00
|
|
|
|
|
|
|
// Copyright 2009 The Go Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
2013-08-09 15:43:19 +00:00
|
|
|
func f() int {
|
2008-08-06 17:02:18 +00:00
|
|
|
if false {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
// we should not be able to return successfully w/o a return statement
|
2013-08-09 15:43:19 +00:00
|
|
|
} // ERROR "return"
|
2008-08-06 17:02:18 +00:00
|
|
|
|
|
|
|
func main() {
|
2008-08-12 05:07:49 +00:00
|
|
|
print(f(), "\n");
|
2008-08-06 17:02:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
uetli:~/Source/go1/usr/gri/gosrc gri$ 6g bug.go && 6l bug.6 && 6.out
|
|
|
|
4882
|
|
|
|
*/
|