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/chan/perm.go b/test/chan/perm.go
index cdbef62..b19cbf3 100644
--- a/test/chan/perm.go
+++ b/test/chan/perm.go
@@ -15,10 +15,10 @@
 func main() {
 	cr = c;		// ok
 	cs = c;		// ok
-	c = cr;		// ERROR "illegal types|incompatible"
-	c = cs;		// ERROR "illegal types|incompatible"
-	cr = cs;	// ERROR "illegal types|incompatible"
-	cs = cr;	// ERROR "illegal types|incompatible"
+	c = cr;		// ERROR "illegal types|incompatible|cannot"
+	c = cs;		// ERROR "illegal types|incompatible|cannot"
+	cr = cs;	// ERROR "illegal types|incompatible|cannot"
+	cs = cr;	// ERROR "illegal types|incompatible|cannot"
 
 	c <- 0;		// ok
 	ok := c <- 0;	// ok
diff --git a/test/const1.go b/test/const1.go
index 0d48ada..622b837 100644
--- a/test/const1.go
+++ b/test/const1.go
@@ -65,15 +65,15 @@
 func f(int);
 
 func main() {
-	f(Int8);	// ERROR "convert|wrong type"
-	f(Minus1);	// ERROR "convert|wrong type"
-	f(Uint8);	// ERROR "convert|wrong type"
+	f(Int8);	// ERROR "convert|wrong type|cannot"
+	f(Minus1);	// ERROR "convert|wrong type|cannot"
+	f(Uint8);	// ERROR "convert|wrong type|cannot"
 	f(Const);	// OK
-	f(Float32);	// ERROR "convert|wrong type"
-	f(Float);	// ERROR "convert|wrong type"
+	f(Float32);	// ERROR "convert|wrong type|cannot"
+	f(Float);	// ERROR "convert|wrong type|cannot"
 	f(ConstFloat);	// ERROR "truncate"
 	f(ConstFloat - 0.5);	// OK
-	f(Big);	// ERROR "convert|wrong type"
-	f(String);	// ERROR "convert|wrong type"
-	f(Bool);	// ERROR "convert|wrong type"
+	f(Big);	// ERROR "convert|wrong type|cannot"
+	f(String);	// ERROR "convert|wrong type|cannot"
+	f(Bool);	// ERROR "convert|wrong type|cannot"
 }
diff --git a/test/convert3.go b/test/convert3.go
index d733ce2..cb05000 100644
--- a/test/convert3.go
+++ b/test/convert3.go
@@ -21,5 +21,5 @@
 type H *[4]int
 type J []int
 var h H
-var j1 J = h	// ERROR "compat|illegal"
+var j1 J = h	// ERROR "compat|illegal|cannot|cannot"
 var j2 = J(h)
diff --git a/test/convlit.go b/test/convlit.go
index be12e63..e65dad3 100644
--- a/test/convlit.go
+++ b/test/convlit.go
@@ -19,11 +19,11 @@
 
 // implicit conversions merit scrutiny
 var s string;
-var bad1 string = 1;	// ERROR "conver|incompatible"
-var bad2 = s + 1;		// ERROR "conver|incompatible"
-var bad3 = s + 'a';	// ERROR "conver|incompatible"
-var bad4 = "a" + 1;	// ERROR "literals|incompatible|convert"
-var bad5 = "a" + 'a';	// ERROR "literals|incompatible|convert"
+var bad1 string = 1;	// ERROR "conver|incompatible|invalid|cannot"
+var bad2 = s + 1;		// ERROR "conver|incompatible|invalid"
+var bad3 = s + 'a';	// ERROR "conver|incompatible|invalid"
+var bad4 = "a" + 1;	// ERROR "literals|incompatible|convert|invalid"
+var bad5 = "a" + 'a';	// ERROR "literals|incompatible|convert|invalid"
 
 var bad6 int = 1.5;	// ERROR "convert|truncate"
 var bad7 int = 1e100;	// ERROR "overflow"
diff --git a/test/convlit1.go b/test/convlit1.go
index 94d2896..1e6673c 100644
--- a/test/convlit1.go
+++ b/test/convlit1.go
@@ -6,12 +6,12 @@
 
 package main
 
-var a = []int { "a" };	// ERROR "conver|incompatible"
+var a = []int { "a" };	// ERROR "conver|incompatible|cannot"
 var b = int { 1 };	// ERROR "compos"
 
 
 func f() int
 
 func main() {
-	if f < 1 { }	// ERROR "conver|incompatible"
+	if f < 1 { }	// ERROR "conver|incompatible|invalid"
 }
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"
 }
diff --git a/test/func4.go b/test/func4.go
index f9e394f..bcf5b93 100644
--- a/test/func4.go
+++ b/test/func4.go
@@ -9,6 +9,6 @@
 var notmain func()
 
 func main() {
-	var x = &main;		// ERROR "address of function|invalid"
-	main = notmain;	// ERROR "assign to function|invalid"
+	var x = &main;		// ERROR "address of|invalid"
+	main = notmain;	// ERROR "assign to|invalid"
 }
diff --git a/test/golden.out b/test/golden.out
index ca01bd2..d140373 100644
--- a/test/golden.out
+++ b/test/golden.out
@@ -132,13 +132,6 @@
 
 panic PC=xxx
 
-=========== fixedbugs/bug121.go
-fixedbugs/bug121.go:9: syntax error near T
-fixedbugs/bug121.go:20: incomplete type I
-fixedbugs/bug121.go:20: illegal types for operand: AS
-	I
-	*S
-
 =========== fixedbugs/bug148.go
 2 3
 interface is main.T, not main.T·bug148·1
diff --git a/test/interface/pointer.go b/test/interface/pointer.go
index 202c37d..d94ec7c 100644
--- a/test/interface/pointer.go
+++ b/test/interface/pointer.go
@@ -32,6 +32,6 @@
 func main() {
 	re := new(Regexp);
 	print("call addinst\n");
-	var x Inst = AddInst(new(Start));	// ERROR "illegal|incompatible"
+	var x Inst = AddInst(new(Start));	// ERROR "illegal|incompatible|is not"
 	print("return from  addinst\n");
 }