1
0
mirror of https://github.com/golang/go synced 2024-11-22 10:54:46 -07:00

bug 100 - spurious return warnings

R=r
OCL=15221
CL=15221
This commit is contained in:
Russ Cox 2008-09-12 08:37:08 -07:00
parent 47580f79b4
commit d988e78889

27
test/bugs/bug100.go Normal file
View File

@ -0,0 +1,27 @@
// 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.
// $G $D/$F.go || (echo BUG: should compile cleanly; exit 1)
package main
func f() int {
i := 0
for {
if i >= sys.argc() {
return i
}
i++
}
}
func g() int {
for {
}
}
func h() int {
for {
return 1
}
}