]> Cypherpunks.ru repositories - gostls13.git/commitdiff
test: match gccgo error messages
authorIan Lance Taylor <iant@golang.org>
Thu, 3 Dec 2020 02:13:14 +0000 (18:13 -0800)
committerIan Lance Taylor <iant@golang.org>
Thu, 3 Dec 2020 16:28:44 +0000 (16:28 +0000)
assign.go:59:28: error: ‘x’ repeated on left side of :=
assign.go:65:20: error: ‘a’ repeated on left side of :=

method2.go:36:11: error: reference to method ‘val’ in type that is pointer to interface, not interface
method2.go:37:11: error: reference to method ‘val’ in type that is pointer to interface, not interface

Change-Id: I8f385c75a82fae4eacf4618df8f9f65932826494
Reviewed-on: https://go-review.googlesource.com/c/go/+/274447
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
test/assign.go
test/method2.go

index 6611f8ce3ef17a41721adb12356a7dfba2077f7e..62fd3b5be3ca2923d41bba0714f41d838004ceab 100644 (file)
@@ -56,13 +56,13 @@ func main() {
        {
                var x = 1
                {
-                       x, x := 2, 3 // ERROR "x repeated on left side of :="
+                       x, x := 2, 3 // ERROR ".*x.* repeated on left side of :="
                        _ = x
                }
                _ = x
        }
        {
-               a, a := 1, 2 // ERROR "a repeated on left side of :="
+               a, a := 1, 2 // ERROR ".*a.* repeated on left side of :="
                _ = a
        }
 }
index 7feb6750555079f243d4bd5c0b1912b9b203710d..ac1d771c0504f19c6888cd44f2cbd4b9e3ec36ec 100644 (file)
@@ -33,8 +33,8 @@ var _ = (*Val).val // ERROR "method"
 var v Val
 var pv = &v
 
-var _ = pv.val() // ERROR "undefined"
-var _ = pv.val   // ERROR "undefined"
+var _ = pv.val() // ERROR "undefined|pointer to interface"
+var _ = pv.val   // ERROR "undefined|pointer to interface"
 
 func (t *T) g() int { return t.a }