commit | 39b28df01eff7c9111cad6497544956289c8fb6a | [log] [tgz] |
---|---|---|
author | Rob Pike <r@golang.org> | Mon Jun 16 11:36:23 2008 -0700 |
committer | Rob Pike <r@golang.org> | Mon Jun 16 11:36:23 2008 -0700 |
tree | c94cfebaaa59e2384703ac4a85c815979704a27f | |
parent | e1a06ccc80159cf2b6a3cd86493c6a53b5a6f9e8 [diff] [blame] |
update test results SVN=122912
diff --git a/test/switch1.go b/test/switch1.go index f2f006f..2ad84f6 100644 --- a/test/switch1.go +++ b/test/switch1.go
@@ -6,11 +6,13 @@ package main -func main() { - i := 0; - switch x := 5; { // BUG if there is a simple stat, the condition must be present - case i < x: - case i == x: - case i > x: +func main() int { + i := 0; + switch x := 5; { + case i < x: + return 0; + case i == x: + case i > x: + return 1; } }