]> Cypherpunks repositories - gostls13.git/commitdiff
test: Recognize gccgo error messages.
authorIan Lance Taylor <iant@golang.org>
Thu, 2 Sep 2010 04:04:57 +0000 (21:04 -0700)
committerIan Lance Taylor <iant@golang.org>
Thu, 2 Sep 2010 04:04:57 +0000 (21:04 -0700)
bug278.go:18: error: invalid left hand side of assignment
bug278.go:19: error: array is not addressable
bug278.go:21: error: invalid left hand side of assignment
bug278.go:22: error: invalid left hand side of assignment

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

test/fixedbugs/bug278.go

index 8c804cfe4a1309e6ec5e55dde38ea88925f5b7d6..3699b9a141d47d72c6e0098cd5a4de70b64a11cf 100644 (file)
@@ -15,9 +15,9 @@ func f() [10]int {
 var m map[int][10]int
 
 func main() {
-       f()[1] = 2      // ERROR "cannot"
-       f()[2:3][0] = 4 // ERROR "cannot"
+       f()[1] = 2      // ERROR "cannot|invalid"
+       f()[2:3][0] = 4 // ERROR "cannot|addressable"
        var x = "abc"
-       x[2] = 3        // ERROR "cannot"
-       m[0][5] = 6  // ERROR "cannot"
+       x[2] = 3        // ERROR "cannot|invalid"
+       m[0][5] = 6  // ERROR "cannot|invalid"
 }