2012-02-16 21:49:30 -07:00
|
|
|
// errorcheck
|
2008-08-06 11:02:18 -06: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 09:43:19 -06:00
|
|
|
func f() int {
|
2008-08-06 11:02:18 -06:00
|
|
|
if false {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
// we should not be able to return successfully w/o a return statement
|
2013-08-09 09:43:19 -06:00
|
|
|
} // ERROR "return"
|
2008-08-06 11:02:18 -06:00
|
|
|
|
|
|
|
func main() {
|
2008-08-11 23:07:49 -06:00
|
|
|
print(f(), "\n");
|
2008-08-06 11:02:18 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
uetli:~/Source/go1/usr/gri/gosrc gri$ 6g bug.go && 6l bug.6 && 6.out
|
|
|
|
4882
|
|
|
|
*/
|