Commit 705f9af3 authored by Robert Griesemer's avatar Robert Griesemer

Replacement for abandoned CL 29626:

bug157 and bug158

R=rsc
DELTA=59  (59 added, 0 deleted, 0 changed)
OCL=29632
CL=29634
parent d83dc4f5
// $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
*/
// $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
*/
......@@ -104,6 +104,15 @@ BUG should compile
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment