bug157 and bug158
R=rsc
DELTA=59 (59 added, 0 deleted, 0 changed)
OCL=29632
CL=29634
--- /dev/null
+// $G $D/$F.go || echo BUG: should compile
+
+// 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() {}
+
+func main() {
+ x := 0;
+
+ // this compiles
+ switch x {
+ case 0: f();
+ default: f();
+ }
+
+ // this doesn't but it should
+ // (semicolons are not needed at the end of a statement list)
+ switch x {
+ case 0: f()
+ default: f()
+ }
+}
+
+
+/*
+bug155.go:20: syntax error near default
+bug155.go:20: first switch statement must be a case
+*/
--- /dev/null
+// $G $D/$F.go || echo BUG: should compile
+
+// 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 main() {
+ x := 0;
+
+ // this compiles
+ switch x {
+ case 0:
+ }
+
+ // this doesn't but should
+ switch 0 {
+ case 0:
+ }
+}
+
+
+/*
+bug156.go:14: fatal error: dowidth: unknown type: E-33
+*/
5 7
BUG: should crash
+=========== bugs/bug157.go
+bugs/bug157.go:20: syntax error near default
+bugs/bug157.go:20: first switch statement must be a case
+BUG: should compile
+
+=========== bugs/bug158.go
+bugs/bug158.go:14: fatal error: dowidth: unknown type: E-33
+BUG: should compile
+
=========== fixedbugs/bug016.go
fixedbugs/bug016.go:7: constant -3 overflows uint