]> Cypherpunks repositories - gostls13.git/commitdiff
test: match gccgo error messages
authorIan Lance Taylor <iant@golang.org>
Sat, 24 Sep 2011 04:23:40 +0000 (21:23 -0700)
committerIan Lance Taylor <iant@golang.org>
Sat, 24 Sep 2011 04:23:40 +0000 (21:23 -0700)
bug340.go:14:7: error: expected type
bug340.go:15:4: error: reference to undefined field or method ‘x’

bug350.go:12:1: error: redefinition of ‘m’
bug350.go:11:1: note: previous definition of ‘m’ was here
bug350.go:15:1: error: redefinition of ‘p’
bug350.go:14:1: note: previous definition of ‘p’ was here

bug351.go:12:6: error: non-name on left side of ‘:=’

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5127041

test/fixedbugs/bug340.go
test/fixedbugs/bug350.go
test/fixedbugs/bug351.go

index 461cc6cd41107c9a7f29095d2fcf79bd894d46d9..af72513e328845ba371c94384b91688c8f54611a 100644 (file)
@@ -10,8 +10,8 @@ package main
 
 func main() {
        var x interface{}
-       switch t := x.(type) { // ERROR "0 is not a type"
-       case 0:
-               t.x = 1 // ERROR "type interface \{ \}"
+       switch t := x.(type) { // GC_ERROR "0 is not a type"
+       case 0:         // GCCGO_ERROR "expected type"
+               t.x = 1 // ERROR "type interface \{ \}|reference to undefined field or method"
        }
 }
index aac2949017a9cfb46003dde6075199c41a1bc122..f8df3f58b96a88d2c55511cdb8bc220a5d00f391 100644 (file)
@@ -8,8 +8,8 @@ package main
 
 type T int
 
-func (T) m() {}
-func (T) m() {} // ERROR "T[.]m redeclared"
+func (T) m() {} // GCCGO_ERROR "previous"
+func (T) m() {} // ERROR "T[.]m redeclared|redefinition"
 
-func (*T) p() {}
-func (*T) p() {} // ERROR "[(][*]T[)][.]p redeclared"
+func (*T) p() {} // GCCGO_ERROR "previous"
+func (*T) p() {} // ERROR "[(][*]T[)][.]p redeclared|redefinition"
index 2f631bbbbc5a98570d4ac31f297058891aca63d4..9625c6a501c0da50c099509b07b4297fda5b11be 100644 (file)
@@ -9,5 +9,5 @@ package main
 var x int
 
 func main() {
-       (x) := 0  // ERROR "non-name [(]x[)]"
+       (x) := 0  // ERROR "non-name [(]x[)]|non-name on left side"
 }