use errchk in more places.
let errchk exit 0 even if it has reported a BUG.
it echoed BUG and that's all that matters.
R=r
DELTA=143 (1 added, 89 deleted, 53 changed)
OCL=32533
CL=32542
diff --git a/test/fixedbugs/bug035.go b/test/fixedbugs/bug035.go
index 5e93a8d..3c31fa5 100644
--- a/test/fixedbugs/bug035.go
+++ b/test/fixedbugs/bug035.go
@@ -7,7 +7,7 @@
package main
func f9(a int) (i int, f float) {
- i := 9; // BUG redeclaration
- f := float(9); // BUG redeclaration
+ i := 9; // ERROR "redecl"
+ f := float(9); // ERROR "redecl"
return i, f;
}
diff --git a/test/fixedbugs/bug037.go b/test/fixedbugs/bug037.go
index b0345cc..ff7d287 100644
--- a/test/fixedbugs/bug037.go
+++ b/test/fixedbugs/bug037.go
@@ -7,5 +7,5 @@
package main
func main() {
- s := vlong(0); // BUG no vlong specified in the language
+ s := vlong(0); // ERROR "undef"
}
diff --git a/test/fixedbugs/bug039.go b/test/fixedbugs/bug039.go
index a87e986..712e843 100644
--- a/test/fixedbugs/bug039.go
+++ b/test/fixedbugs/bug039.go
@@ -7,5 +7,5 @@
package main
func main (x int) {
- var x int; // BUG redeclaration error
+ var x int; // ERROR "redecl"
}
diff --git a/test/fixedbugs/bug049.go b/test/fixedbugs/bug049.go
index 72ac7ec..13527e8 100644
--- a/test/fixedbugs/bug049.go
+++ b/test/fixedbugs/bug049.go
@@ -7,7 +7,7 @@
package main
func atom(s string) {
- if s == nil {
+ if s == nil { // ERROR "nil"
return;
}
}
diff --git a/test/fixedbugs/bug050.go b/test/fixedbugs/bug050.go
index afc5455..585c446 100644
--- a/test/fixedbugs/bug050.go
+++ b/test/fixedbugs/bug050.go
@@ -4,5 +4,5 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-func main() {
+func main() { // ERROR "package"
}
diff --git a/test/fixedbugs/bug051.go b/test/fixedbugs/bug051.go
index c5b9606..199a4b9 100644
--- a/test/fixedbugs/bug051.go
+++ b/test/fixedbugs/bug051.go
@@ -11,5 +11,5 @@
}
func main() {
- const n = f(); // should report only one error
+ const n = f(); // ERROR "const"
}
diff --git a/test/fixedbugs/bug062.go b/test/fixedbugs/bug062.go
index 65d676f..8a9ba95 100644
--- a/test/fixedbugs/bug062.go
+++ b/test/fixedbugs/bug062.go
@@ -7,5 +7,5 @@
package main
func main() {
- var s string = nil; // nil should not be assignment compatible with string
+ var s string = nil; // ERROR "illegal|invalid"
}
diff --git a/test/fixedbugs/bug068.go b/test/fixedbugs/bug068.go
index f1dcce3..a7cf423 100644
--- a/test/fixedbugs/bug068.go
+++ b/test/fixedbugs/bug068.go
@@ -9,7 +9,7 @@
package main
const c = '\''; // this works
-const s = "\'"; // this doesn't
+const s = "\'"; // ERROR "invalid|escape"
/*
There is no reason why the escapes need to be different inside strings and chars.
diff --git a/test/fixedbugs/bug072.go b/test/fixedbugs/bug072.go
index f711790..efe5626 100644
--- a/test/fixedbugs/bug072.go
+++ b/test/fixedbugs/bug072.go
@@ -7,5 +7,5 @@
package main
func main() {
- s := string(bug); // crash
+ s := string(bug); // ERROR "undef"
}
diff --git a/test/fixedbugs/bug073.go b/test/fixedbugs/bug073.go
index e7a0843..99e7cd1 100644
--- a/test/fixedbugs/bug073.go
+++ b/test/fixedbugs/bug073.go
@@ -9,6 +9,6 @@
func main() {
var s int = 0;
var x int = 0;
- x = x << s; // should complain that s is not a uint
- x = x >> s; // should complain that s is not a uint
+ x = x << s; // ERROR "illegal|inval|shift"
+ x = x >> s; // ERROR "illegal|inval|shift"
}
diff --git a/test/fixedbugs/bug074.go b/test/fixedbugs/bug074.go
index d9865c5..7b6d14e 100644
--- a/test/fixedbugs/bug074.go
+++ b/test/fixedbugs/bug074.go
@@ -7,6 +7,6 @@
package main
func main() {
- x := string{'a', 'b', '\n'};
+ x := string{'a', 'b', '\n'}; // ERROR "composite"
print(x);
}
diff --git a/test/fixedbugs/bug083.dir/bug1.go b/test/fixedbugs/bug083.dir/bug1.go
index a48edbe..486fe76 100644
--- a/test/fixedbugs/bug083.dir/bug1.go
+++ b/test/fixedbugs/bug083.dir/bug1.go
@@ -10,4 +10,5 @@
// visible here in package bug1. The test for failure is in
// ../bug083.go.
-var v1 bug0.t0
+var v1 bug0.t0; // ERROR "bug0"
+
diff --git a/test/fixedbugs/bug086.go b/test/fixedbugs/bug086.go
index ef50c0c..7d85063 100644
--- a/test/fixedbugs/bug086.go
+++ b/test/fixedbugs/bug086.go
@@ -6,7 +6,7 @@
package main
-func f() int {
+func f() int { // ERROR "return"
if false {
return 0;
}
diff --git a/test/fixedbugs/bug091.go b/test/fixedbugs/bug091.go
index 82391ea..cfbb09c 100644
--- a/test/fixedbugs/bug091.go
+++ b/test/fixedbugs/bug091.go
@@ -16,8 +16,7 @@
}
func f3() {
- i := c; // BUG: compiles but should not. constant is not in scope in this function
- goto exit; // BUG: compiles but should not. label is not in this function
+ i := c; // ERROR "undef"
}
func main() {
diff --git a/test/fixedbugs/bug103.go b/test/fixedbugs/bug103.go
index c350a53..6ac4e9a 100644
--- a/test/fixedbugs/bug103.go
+++ b/test/fixedbugs/bug103.go
@@ -9,6 +9,6 @@
func f() /* no return type */ {}
func main() {
- x := f(); // should not compile
+ x := f(); // ERROR "mismatch"
}
diff --git a/test/fixedbugs/bug131.go b/test/fixedbugs/bug131.go
index 96e7cc7..376f528 100644
--- a/test/fixedbugs/bug131.go
+++ b/test/fixedbugs/bug131.go
@@ -8,5 +8,5 @@
func main() {
const a uint64 = 10;
- var b int64 = a;
+ var b int64 = a; // ERROR "convert"
}
diff --git a/test/fixedbugs/bug133.dir/bug2.go b/test/fixedbugs/bug133.dir/bug2.go
index 2b2b50b..0b8393c 100644
--- a/test/fixedbugs/bug133.dir/bug2.go
+++ b/test/fixedbugs/bug133.dir/bug2.go
@@ -12,5 +12,5 @@
func fn(p *T2) int {
// This reference should be invalid, because bug0.T.i is local
// to package bug0 and should not be visible in package bug1.
- return p.t.i
+ return p.t.i; // ERROR "field|undef"
}
diff --git a/test/fixedbugs/bug146.go b/test/fixedbugs/bug146.go
index 3095d26..aef8476 100644
--- a/test/fixedbugs/bug146.go
+++ b/test/fixedbugs/bug146.go
@@ -10,5 +10,5 @@
type Slice []byte;
a := [...]byte{ 0 };
b := Slice(&a); // This should be OK.
- c := Slice(a); // ERROR "invalid"
+ c := Slice(a); // ERROR "invalid|illegal"
}