mirror of
https://github.com/golang/go
synced 2024-11-05 18:36:08 +00:00
91173b8930
bug039.go:6:7: error: redefinition of 'x' bug039.go:5:1: note: previous definition of 'x' was here bug049.go:6:9: error: incompatible types in binary expression bug062.go:6:7: error: incompatible type in initialization bug086.go:5:1: error: control reaches end of non-void function bug103.go:8:2: error: variable has no type bug121.go:9:2: error: expected signature or type name bug131.go:7:7: error: incompatible type in initialization bug165.go:10:8: error: expected complete type bug171.go:5:1: error: control reaches end of non-void function bug171.go:6:1: error: control reaches end of non-void function bug172.go:7:6: error: expected integer type bug182.go:7:2: error: if statement expects boolean expression bug183.go:10:5: error: incompatible types in assignment bug183.go:19:5: error: incompatible types in assignment R=rsc DELTA=15 (0 added, 0 deleted, 15 changed) OCL=33168 CL=33175
23 lines
456 B
Go
23 lines
456 B
Go
// errchk $G $D/$F.go
|
|
|
|
// 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
|
|
|
|
func f() int { // ERROR "return|control"
|
|
if false {
|
|
return 0;
|
|
}
|
|
// we should not be able to return successfully w/o a return statement
|
|
}
|
|
|
|
func main() {
|
|
print(f(), "\n");
|
|
}
|
|
|
|
/*
|
|
uetli:~/Source/go1/usr/gri/gosrc gri$ 6g bug.go && 6l bug.6 && 6.out
|
|
4882
|
|
*/
|