more 6g reorg; checkpoint.
typecheck.c is now responsible for all type checking
except for assignment and function argument "..."
R=ken
OCL=32661
CL=32667
diff --git a/test/fixedbugs/bug022.go b/test/fixedbugs/bug022.go
index 7964148..0250135 100644
--- a/test/fixedbugs/bug022.go
+++ b/test/fixedbugs/bug022.go
@@ -9,7 +9,7 @@
func putint(digits *string) {
var i byte;
i = (*digits)[7]; // compiles
- i = digits[7]; // ERROR "illegal|is not"
+ i = digits[7]; // ERROR "illegal|is not|invalid"
}
func main() {
diff --git a/test/fixedbugs/bug062.go b/test/fixedbugs/bug062.go
index 8a9ba95..4346c5a 100644
--- a/test/fixedbugs/bug062.go
+++ b/test/fixedbugs/bug062.go
@@ -7,5 +7,5 @@
package main
func main() {
- var s string = nil; // ERROR "illegal|invalid"
+ var s string = nil; // ERROR "illegal|invalid|cannot"
}
diff --git a/test/fixedbugs/bug090.go b/test/fixedbugs/bug090.go
index 50e08b7..8318ab9 100644
--- a/test/fixedbugs/bug090.go
+++ b/test/fixedbugs/bug090.go
@@ -38,9 +38,9 @@
assert(i != f3div2, "i != f3div2"); // ERROR "truncate"
const g float64 = 1.0;
- i = g; // ERROR "convert|incompatible"
+ i = g; // ERROR "convert|incompatible|cannot"
const h float64 = 3.14;
- i = h; // ERROR "convert|incompatible"
+ i = h; // ERROR "convert|incompatible|cannot"
i = int(h); // ERROR "truncate"
}
diff --git a/test/fixedbugs/bug121.go b/test/fixedbugs/bug121.go
index 5840095..6473fa9 100644
--- a/test/fixedbugs/bug121.go
+++ b/test/fixedbugs/bug121.go
@@ -10,16 +10,6 @@
type I interface {
f, g ();
- h T; // should only allow FunctionType here
+ h T; // ERROR "syntax"
}
-type S struct {
-}
-
-func (s *S) f() {}
-func (s *S) g() {}
-func (s *S) h() {} // here we can't write (s *S) T either
-
-func main() {
- var i I = new(S);
-}
diff --git a/test/fixedbugs/bug131.go b/test/fixedbugs/bug131.go
index 376f528..c2644c4 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; // ERROR "convert"
+ var b int64 = a; // ERROR "convert|cannot"
}
diff --git a/test/fixedbugs/bug146.go b/test/fixedbugs/bug146.go
index aef8476..41a6d3a 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|illegal"
+ c := Slice(a); // ERROR "invalid|illegal|cannot"
}
diff --git a/test/fixedbugs/bug170.go b/test/fixedbugs/bug170.go
index b04e771..e7f1c51 100644
--- a/test/fixedbugs/bug170.go
+++ b/test/fixedbugs/bug170.go
@@ -5,9 +5,10 @@
// license that can be found in the LICENSE file.
package main
-var v1 = ([10]int)(nil) // ERROR "illegal|nil|invalid"
-var v2 [10]int = nil // ERROR "illegal|nil|incompatible"
-var v3 [10]int
+var v1 = ([10]int)(nil); // ERROR "illegal|nil|invalid"
+var v2 [10]int = nil; // ERROR "illegal|nil|incompatible"
+var v3 [10]int;
+var v4 = nil; // ERROR "nil"
func main() {
v3 = nil; // ERROR "illegal|nil|incompatible"
}