]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.typeparams] cmd/compile/internal/types2: adjusted more error messages for compiler
authorRobert Griesemer <gri@golang.org>
Wed, 9 Dec 2020 20:28:15 +0000 (12:28 -0800)
committerRobert Griesemer <gri@golang.org>
Wed, 9 Dec 2020 23:59:57 +0000 (23:59 +0000)
Triaged and adjusted more test/fixedbugs/* tests.

Change-Id: I80b9ead2445bb8d126b7d79db4bea9ddcb225a84
Reviewed-on: https://go-review.googlesource.com/c/go/+/276812
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>

47 files changed:
src/cmd/compile/internal/types2/decl.go
src/cmd/compile/internal/types2/expr.go
src/cmd/compile/internal/types2/resolver.go
test/fixedbugs/issue13480.go
test/fixedbugs/issue17588.go
test/fixedbugs/issue18392.go
test/fixedbugs/issue19323.go
test/fixedbugs/issue19482.go
test/fixedbugs/issue19699b.go
test/fixedbugs/issue19880.go
test/fixedbugs/issue19947.go
test/fixedbugs/issue20185.go
test/fixedbugs/issue20227.go
test/fixedbugs/issue20415.go
test/fixedbugs/issue20749.go
test/fixedbugs/issue22389.go
test/fixedbugs/issue22794.go
test/fixedbugs/issue22822.go
test/fixedbugs/issue22921.go
test/fixedbugs/issue23094.go
test/fixedbugs/issue23609.go
test/fixedbugs/issue23823.go
test/fixedbugs/issue24470.go
test/fixedbugs/issue25727.go
test/fixedbugs/issue26416.go
test/fixedbugs/issue26616.go
test/fixedbugs/issue27595.go
test/fixedbugs/issue28079c.go
test/fixedbugs/issue28450.go
test/fixedbugs/issue30085.go
test/fixedbugs/issue30087.go
test/fixedbugs/issue35291.go
test/fixedbugs/issue38117.go
test/fixedbugs/issue38745.go
test/fixedbugs/issue3925.go
test/fixedbugs/issue4085a.go
test/fixedbugs/issue41247.go
test/fixedbugs/issue41440.go
test/fixedbugs/issue41500.go
test/fixedbugs/issue4215.go
test/fixedbugs/issue4251.go
test/fixedbugs/issue4429.go
test/fixedbugs/issue4458.go
test/fixedbugs/issue4470.go
test/fixedbugs/issue4517d.go
test/fixedbugs/issue4909a.go
test/run.go

index bc3e665b711fe079450c51669a65c5c664ebe8dd..de6f4df73ee5934dd9bb597580033482aa398a0a 100644 (file)
@@ -364,7 +364,11 @@ func (check *Checker) cycleError(cycle []Object) {
        //           cycle? That would be more consistent with other error messages.
        i := firstInSrc(cycle)
        obj := cycle[i]
-       check.errorf(obj.Pos(), "illegal cycle in declaration of %s", obj.Name())
+       if check.conf.CompilerErrorMessages {
+               check.errorf(obj.Pos(), "invalid recursive type %s", obj.Name())
+       } else {
+               check.errorf(obj.Pos(), "illegal cycle in declaration of %s", obj.Name())
+       }
        for range cycle {
                check.errorf(obj.Pos(), "\t%s refers to", obj.Name()) // secondary error, \t indented
                i++
index bede0c639d430ccea9b9af4efb010f3748a93b06..2fabd9694e467761385d1795024e694dbff6a4c3 100644 (file)
@@ -69,7 +69,11 @@ var unaryOpPredicates = opPredicates{
 func (check *Checker) op(m opPredicates, x *operand, op syntax.Operator) bool {
        if pred := m[op]; pred != nil {
                if !pred(x.typ) {
-                       check.invalidOpf(x, "operator %s not defined for %s", op, x)
+                       if check.conf.CompilerErrorMessages {
+                               check.invalidOpf(x, "operator %s not defined on %s", op, x)
+                       } else {
+                               check.invalidOpf(x, "operator %s not defined for %s", op, x)
+                       }
                        return false
                }
        } else {
@@ -729,7 +733,11 @@ func (check *Checker) comparison(x, y *operand, op syntax.Operator) {
                        if x.isNil() {
                                typ = y.typ
                        }
-                       err = check.sprintf("operator %s not defined for %s", op, typ)
+                       if check.conf.CompilerErrorMessages {
+                               err = check.sprintf("operator %s not defined on %s", op, typ)
+                       } else {
+                               err = check.sprintf("operator %s not defined for %s", op, typ)
+                       }
                }
        } else {
                err = check.sprintf("mismatched types %s and %s", x.typ, y.typ)
@@ -1268,7 +1276,11 @@ func (check *Checker) exprInternal(x *operand, e syntax.Expr, hint Type) exprKin
                                        }
                                        i := fieldIndex(utyp.fields, check.pkg, key.Value)
                                        if i < 0 {
-                                               check.errorf(kv, "unknown field %s in struct literal", key.Value)
+                                               if check.conf.CompilerErrorMessages {
+                                                       check.errorf(kv, "unknown field '%s' in struct literal of type %s", key.Value, base)
+                                               } else {
+                                                       check.errorf(kv, "unknown field %s in struct literal", key.Value)
+                                               }
                                                continue
                                        }
                                        fld := fields[i]
index cf9893ca87478857ce6940136a257a0104b05ed6..5cd0a3e1987560b663a9b82795bbc69bdfe8683a 100644 (file)
@@ -677,9 +677,17 @@ func (check *Checker) unusedImports() {
                                        path := obj.imported.path
                                        base := pkgName(path)
                                        if obj.name == base {
-                                               check.softErrorf(obj.pos, "%q imported but not used", path)
+                                               if check.conf.CompilerErrorMessages {
+                                                       check.softErrorf(obj.pos, "%q imported and not used", path)
+                                               } else {
+                                                       check.softErrorf(obj.pos, "%q imported but not used", path)
+                                               }
                                        } else {
-                                               check.softErrorf(obj.pos, "%q imported but not used as %s", path, obj.name)
+                                               if check.conf.CompilerErrorMessages {
+                                                       check.softErrorf(obj.pos, "%q imported and not used as %s", path, obj.name)
+                                               } else {
+                                                       check.softErrorf(obj.pos, "%q imported but not used as %s", path, obj.name)
+                                               }
                                        }
                                }
                        }
@@ -689,7 +697,11 @@ func (check *Checker) unusedImports() {
        // check use of dot-imported packages
        for _, unusedDotImports := range check.unusedDotImports {
                for pkg, pos := range unusedDotImports {
-                       check.softErrorf(pos, "%q imported but not used", pkg.path)
+                       if check.conf.CompilerErrorMessages {
+                               check.softErrorf(pos, "%q imported and not used", pkg.path)
+                       } else {
+                               check.softErrorf(pos, "%q imported but not used", pkg.path)
+                       }
                }
        }
 }
index 8c2fc4492239940e25b85b40908e7676faae3b95..7e859c56c5d3d6f49617096bde837a2352530a44 100644 (file)
@@ -18,21 +18,21 @@ func bug() {
        var m M
        var f F
 
-       _ = s == S(nil) // ERROR "compare.*to nil|operator \=\= not defined for ."
-       _ = S(nil) == s // ERROR "compare.*to nil|operator \=\= not defined for ."
+       _ = s == S(nil) // ERROR "compare.*to nil|operator \=\= not defined for .|cannot compare"
+       _ = S(nil) == s // ERROR "compare.*to nil|operator \=\= not defined for .|cannot compare"
        switch s {
-       case S(nil): // ERROR "compare.*to nil|operator \=\= not defined for ."
+       case S(nil): // ERROR "compare.*to nil|operator \=\= not defined for .|cannot compare"
        }
 
-       _ = m == M(nil) // ERROR "compare.*to nil|operator \=\= not defined for ."
-       _ = M(nil) == m // ERROR "compare.*to nil|operator \=\= not defined for ."
+       _ = m == M(nil) // ERROR "compare.*to nil|operator \=\= not defined for .|cannot compare"
+       _ = M(nil) == m // ERROR "compare.*to nil|operator \=\= not defined for .|cannot compare"
        switch m {
-       case M(nil): // ERROR "compare.*to nil|operator \=\= not defined for ."
+       case M(nil): // ERROR "compare.*to nil|operator \=\= not defined for .|cannot compare"
        }
 
-       _ = f == F(nil) // ERROR "compare.*to nil|operator \=\= not defined for ."
-       _ = F(nil) == f // ERROR "compare.*to nil|operator \=\= not defined for ."
+       _ = f == F(nil) // ERROR "compare.*to nil|operator \=\= not defined for .|cannot compare"
+       _ = F(nil) == f // ERROR "compare.*to nil|operator \=\= not defined for .|cannot compare"
        switch f {
-       case F(nil): // ERROR "compare.*to nil|operator \=\= not defined for ."
+       case F(nil): // ERROR "compare.*to nil|operator \=\= not defined for .|cannot compare"
        }
 }
index 1be57c62923003bb1d7d2cd70b48232627a371ad..77efaf7ef16d01f9a5a9837e47568dc0b44ffc46 100644 (file)
@@ -11,7 +11,7 @@
 
 package p
 
-type F func(b T)  // ERROR "T is not a type"
+type F func(b T)  // ERROR "T .*is not a type"
 
 func T(fn F) {
     func() {
index 053a337867997cd9df9c03183c2e9925b20f6de4..e0640ed2ee48b408b4a5e6f72c0c1195425e126f 100644 (file)
@@ -10,5 +10,5 @@ type A interface {
        // TODO(mdempsky): This should be an error, but this error is
        // nonsense. The error should actually mention that there's a
        // type loop.
-       Fn(A.Fn) // ERROR "type A has no method Fn"
+       Fn(A.Fn) // ERROR "type A has no method Fn|A.Fn undefined"
 }
index f90af660d5e1d569919b51436b94db24bbf7e101..a225d157b23c9116cfd42e31619816b3b0f1ea76 100644 (file)
@@ -9,11 +9,11 @@ package p
 func g() {}
 
 func f() {
-       g()[:] // ERROR "g.. used as value"
+       g()[:] // ERROR "g.* used as value"
 }
 
 func g2() ([]byte, []byte) { return nil, nil }
 
 func f2() {
-       g2()[:] // ERROR "multiple-value g2.. in single-value context"
+       g2()[:] // ERROR "multiple-value g2.. in single-value context|2-valued g"
 }
index 97497a434c384d5137a2aaf0c2ae0af704f5e133..d2a0edd0a9f34a792e1d96f731f93749c970aacc 100644 (file)
@@ -22,13 +22,13 @@ func ok() {
 
 var (
        y = T{"stare"}
-       w = T{_: "look"} // ERROR "invalid field name _ in struct initializer"
+       w = T{_: "look"} // ERROR "invalid field name _ in struct initializer|unknown field '_' in struct literal of type T"
        _ = T{"page"}
-       _ = T{_: "out"} // ERROR "invalid field name _ in struct initializer"
+       _ = T{_: "out"} // ERROR "invalid field name _ in struct initializer|unknown field '_' in struct literal of type T"
 )
 
 func bad() {
-       var z = T{_: "verse"} // ERROR "invalid field name _ in struct initializer"
+       var z = T{_: "verse"} // ERROR "invalid field name _ in struct initializer|unknown field '_' in struct literal of type T"
        _ = z
-       _ = T{_: "itinerary"} // ERROR "invalid field name _ in struct initializer"
+       _ = T{_: "itinerary"} // ERROR "invalid field name _ in struct initializer|unknown field '_' in struct literal of type T"
 }
index 4afc0ca8330501e6fbed9529c5bcc76c57e03c9d..32ed30fd2bae2a068881151aec0a2f566a5c32ad 100644 (file)
@@ -11,4 +11,4 @@ func f() bool {
        } else {
                return true
        }
-} // ERROR "missing return at end of function"
+} // ERROR "missing return( at end of function)?"
index 629c95d960f9defa2f9ea78a8bf1689df40dcb8f..c2d81e6631870b7946a44e1a705b74bb770a8817 100644 (file)
@@ -11,7 +11,7 @@ type T struct {
 }
 
 func a() {
-       _ = T // ERROR "type T is not an expression"
+       _ = T // ERROR "type T is not an expression|T \(type\) is not an expression"
 }
 
 func b() {
index 3233469e3930de741a8d6d4dc52f3d18879a5482..752cfc6bf602d08fd91acd78fa8af812f925349e 100644 (file)
@@ -8,8 +8,8 @@
 
 package issue19947
 
-var _ = float32(1) * 1e200 // ERROR "constant 1e\+200 overflows float32"
-var _ = float64(1) * 1e500 // ERROR "constant 1e\+500 overflows float64"
+var _ = float32(1) * 1e200 // ERROR "constant 1e\+200 overflows float32|1e200 .* overflows float32"
+var _ = float64(1) * 1e500 // ERROR "constant 1e\+500 overflows float64|1e500 .* overflows float64"
 
-var _ = complex64(1) * 1e200  // ERROR "constant 1e\+200 overflows complex64"
-var _ = complex128(1) * 1e500 // ERROR "constant 1e\+500 overflows complex128"
+var _ = complex64(1) * 1e200  // ERROR "constant 1e\+200 overflows complex64|1e200 .* overflows complex64"
+var _ = complex128(1) * 1e500 // ERROR "constant 1e\+500 overflows complex128|1e500 .* overflows complex128"
index 2cbb143ed00d58f306afb4697e3bcd65e385c113..86fe0ef8c61666a32a1bbe3cb7633716a483bc44 100644 (file)
@@ -10,7 +10,7 @@
 package p
 
 func F() {
-       switch t := nil.(type) { // ERROR "cannot type switch on non-interface value nil"
+       switch t := nil.(type) { // ERROR "cannot type switch on non-interface value nil|not an interface"
        default:
                _ = t
        }
@@ -19,7 +19,7 @@ func F() {
 const x = 1
 
 func G() {
-       switch t := x.(type) { // ERROR "cannot type switch on non-interface value x \(type untyped int\)"
+       switch t := x.(type) { // ERROR "cannot type switch on non-interface value x \(type untyped int\)|not an interface"
        default:
        }
 }
index 4448eb5438062a36885adae0b59db986e10c98b6..983203cd4851b88b4367dea6c59ca65cfc234af2 100644 (file)
@@ -8,9 +8,9 @@
 
 package p
 
-var _ = 1 / 1e-600000000i  // ERROR "complex division by zero"
-var _ = 1i / 1e-600000000  // ERROR "complex division by zero"
-var _ = 1i / 1e-600000000i // ERROR "complex division by zero"
+var _ = 1 / 1e-600000000i  // ERROR "(complex )?division by zero"
+var _ = 1i / 1e-600000000  // ERROR "(complex )?division by zero"
+var _ = 1i / 1e-600000000i // ERROR "(complex )?division by zero"
 
-var _ = 1 / (1e-600000000 + 1e-600000000i)  // ERROR "complex division by zero"
-var _ = 1i / (1e-600000000 + 1e-600000000i) // ERROR "complex division by zero"
+var _ = 1 / (1e-600000000 + 1e-600000000i)  // ERROR "(complex )?division by zero"
+var _ = 1i / (1e-600000000 + 1e-600000000i) // ERROR "(complex )?division by zero"
index 6f2c342ce41506f3cad6bd8a044eaf252fc2139e..8a4b528a89acfc942d8b77b93ef6b3d06456a182 100644 (file)
@@ -11,7 +11,7 @@ package p
 // 1
 var f byte
 
-var f interface{} // ERROR "previous declaration at issue20415.go:12"
+var f interface{} // ERROR "previous declaration at issue20415.go:12|f redeclared"
 
 func _(f int) {
 }
@@ -22,7 +22,7 @@ var g byte
 func _(g int) {
 }
 
-var g interface{} // ERROR "previous declaration at issue20415.go:20"
+var g interface{} // ERROR "previous declaration at issue20415.go:20|g redeclared"
 
 // 3
 func _(h int) {
@@ -30,4 +30,4 @@ func _(h int) {
 
 var h byte
 
-var h interface{} // ERROR "previous declaration at issue20415.go:31"
+var h interface{} // ERROR "previous declaration at issue20415.go:31|h redeclared"
index af9ff3fbedbc39b9c3474994a84fd8a0fd24ee3b..a670d6ffcd3fb653920aa83fa9b9095bc861ea16 100644 (file)
@@ -9,7 +9,7 @@ package p
 // Verify that the compiler complains even if the array
 // has length 0.
 var a [0]int
-var _ = a[2:] // ERROR "invalid slice index 2"
+var _ = a[2:] // ERROR "invalid slice index 2|index 2 out of bounds"
 
 var b [1]int
-var _ = b[2:] // ERROR "invalid slice index 2"
+var _ = b[2:] // ERROR "invalid slice index 2|index 2 out of bounds"
index 706b44941c0361046cd8a6cf8222adfda6f9f192..75dc28540358ac08541baccdd9d1ce1003ce2a9f 100644 (file)
@@ -14,5 +14,5 @@ func (f *Foo) Call(cb func(*Foo)) {
 
 func main() {
        f := &Foo{}
-       f.Call(func(f) {}) // ERROR "f is not a type"
+       f.Call(func(f) {}) // ERROR "f .*is not a type"
 }
index c7e9eb1224ff213ffd011d235c21ccc2f12b84e0..0c10208d811f72d72b39d04c5161426a0e036b3a 100644 (file)
@@ -15,6 +15,7 @@ func main() {
        i1 := it{Floats: true}
        if i1.floats { // ERROR "(type it .* field or method floats, but does have Floats)"
        }
-       i2 := &it{floats: false} // ERROR "(but does have Floats)"
-       _ = &it{InneR: "foo"}    // ERROR "(but does have inner)"
+       i2 := &it{floats: false} // ERROR "(but does have Floats)|unknown field"
+       _ = &it{InneR: "foo"}    // ERROR "(but does have inner)|unknown field"
+       _ = i2
 }
index e449ddb186e2402766a75df4849d7f5736dde3ac..554b534503826e54801be3d9eabc5116a6c62dab 100644 (file)
@@ -12,5 +12,6 @@ package main
 func F() {
        slice := []int{1, 2, 3}
        len := int(2)
-       println(len(slice)) // ERROR "cannot call non-function len .type int., declared at"
+       println(len(slice)) // ERROR "cannot call non-function len .type int., declared at|cannot call non-function len"
+       _ = slice
 }
index 04f78b2c084d400cf3601d8e1e41d9658670fce1..d5bb1ed122b34cd8056f50d69a9cf1b30520f972 100644 (file)
@@ -8,11 +8,11 @@ package main
 
 import "bytes"
 
-type _ struct{ bytes.nonexist } // ERROR "unexported"
+type _ struct{ bytes.nonexist } // ERROR "unexported|undefined"
 
-type _ interface{ bytes.nonexist } // ERROR "unexported"
+type _ interface{ bytes.nonexist } // ERROR "unexported|undefined"
 
 func main() {
        var _ bytes.Buffer
-       var _ bytes.buffer // ERROR "unexported"
+       var _ bytes.buffer // ERROR "unexported|undefined"
 }
index 415556f300ca38f326dfb0863e2624b2c57a6b32..853b19b92f38fe1216c61a2aa91baabb3da496fa 100644 (file)
@@ -8,4 +8,4 @@
 
 package p
 
-var a [len(a)]int // ERROR "\[len\(a\)\]int"
+var a [len(a)]int // ERROR "\[len\(a\)\]int|initialization loop"
index 7c17a98d32d0636e770957e95bd7a12609533ced..9130e8dd1621ec459fc5fd1c3ebec99c914bd2e4 100644 (file)
@@ -21,7 +21,7 @@ type t3 struct {
 }
 
 var (
-       _ = t2{t1f1: 600} // ERROR "cannot use promoted field t1.t1f1 in struct literal of type t2"
-       _ = t3{t1f2: 800} // ERROR "cannot use promoted field t2.t1.t1f2 in struct literal of type t3"
-       _ = t3{t2f1: 900} // ERROR "cannot use promoted field t2.t2f1 in struct literal of type t3"
+       _ = t2{t1f1: 600} // ERROR "cannot use promoted field t1.t1f1 in struct literal of type t2|unknown field"
+       _ = t3{t1f2: 800} // ERROR "cannot use promoted field t2.t1.t1f2 in struct literal of type t3|unknown field"
+       _ = t3{t2f1: 900} // ERROR "cannot use promoted field t2.t2f1 in struct literal of type t3|unknown field"
 )
index fe6cef1fb4d26a5f55644cf500121ec670d8e96f..4e3cd163b6d4eb546616333f8864372996546dca 100644 (file)
@@ -11,6 +11,6 @@ type I1 = interface {
 }
 
 // BAD: type loop should mention I1; see also #41669
-type I2 interface { // ERROR "invalid recursive type I2\n\tLINE: I2 refers to\n\tLINE: I2$"
+type I2 interface { // ERROR "invalid recursive type I2\n\tLINE: I2 refers to\n\tLINE: I2$|invalid recursive type"
        I1
 }
index d0e5e23fa90840208aa2fa069a3e93f3aff6362b..2805998cca57bb5430cf3fb25cb4085761a98723 100644 (file)
@@ -11,5 +11,6 @@ package p
 
 func f(i interface{}) {
        if x, ok := i.(type); ok { // ERROR "outside type switch"
+               _ = x
        }
 }
index da7c94cc12a921c754dad343b51138186c9d79ec..9e4da6ddba42b0ccb4cc46e9ca204a00abfa542a 100644 (file)
@@ -9,13 +9,13 @@ package main
 import "net/http"
 
 var s = http.Server{}
-var _ = s.doneChan                  // ERROR "s.doneChan undefined .cannot refer to unexported field or method doneChan.$"
+var _ = s.doneChan                  // ERROR "s.doneChan undefined .cannot refer to unexported field or method doneChan.$|s.doneChan undefined"
 var _ = s.DoneChan                  // ERROR "s.DoneChan undefined .type http.Server has no field or method DoneChan.$"
-var _ = http.Server{tlsConfig: nil} // ERROR "unknown field 'tlsConfig' in struct literal.+ .but does have TLSConfig.$"
+var _ = http.Server{tlsConfig: nil} // ERROR "unknown field 'tlsConfig' in struct literal.+ .but does have TLSConfig.$|unknown field 'tlsConfig'"
 var _ = http.Server{DoneChan: nil}  // ERROR "unknown field 'DoneChan' in struct literal of type http.Server$"
 
 type foo struct {
        bar int
 }
 
-var _ = &foo{bAr: 10} // ERROR "unknown field 'bAr' in struct literal.+ .but does have bar.$"
+var _ = &foo{bAr: 10} // ERROR "unknown field 'bAr' in struct literal.+ .but does have bar.$|unknown field 'bAr'"
index bc37fd9d3a8e9dd3cae015a93d193ce65cb19841..44a4fc73b777f152f4b1371e456b0527af8efe70 100644 (file)
@@ -21,7 +21,7 @@ type t3 struct {
 }
 
 var (
-       _ = t2{t1f1: 600} // ERROR "cannot use promoted field t1.t1f1 in struct literal of type t2"
-       _ = t3{t1f2: 800} // ERROR "cannot use promoted field t2.t1.t1f2 in struct literal of type t3"
-       _ = t3{t2f1: 900} // ERROR "cannot use promoted field t2.t2f1 in struct literal of type t3"
+       _ = t2{t1f1: 600} // ERROR "cannot use promoted field t1.t1f1 in struct literal of type t2|unknown field"
+       _ = t3{t1f2: 800} // ERROR "cannot use promoted field t2.t1.t1f2 in struct literal of type t3|unknown field"
+       _ = t3{t2f1: 900} // ERROR "cannot use promoted field t2.t2f1 in struct literal of type t3|unknown field"
 )
index e5565b68ca55aa9160d9625188f62dc038f6b21e..d20d4518c0c0b7d54237fe9f10a8f169361dff44 100644 (file)
@@ -6,13 +6,13 @@
 
 package p
 
-var x int = three() // ERROR "assignment mismatch: 1 variable but three returns 3 values"
+var x int = three() // ERROR "assignment mismatch: 1 variable but three returns 3 values|3\-valued"
 
 func f() {
-       var _ int = three() // ERROR "assignment mismatch: 1 variable but three returns 3 values"
-       var a int = three() // ERROR "assignment mismatch: 1 variable but three returns 3 values"
-       a = three()         // ERROR "assignment mismatch: 1 variable but three returns 3 values"
-       b := three()        // ERROR "assignment mismatch: 1 variable but three returns 3 values"
+       var _ int = three() // ERROR "assignment mismatch: 1 variable but three returns 3 values|3\-valued"
+       var a int = three() // ERROR "assignment mismatch: 1 variable but three returns 3 values|3\-valued"
+       a = three()         // ERROR "assignment mismatch: 1 variable but three returns 3 values|cannot assign"
+       b := three()        // ERROR "assignment mismatch: 1 variable but three returns 3 values|cannot initialize"
 
        _, _ = a, b
 }
index af5c7a10d9b0161a14022b74816745c5b1d05506..82771457698599474aafb55fff97fa0e8d22a870 100644 (file)
@@ -6,9 +6,9 @@
 
 package main
 
-var a = twoResults()       // ERROR "assignment mismatch: 1 variable but twoResults returns 2 values"
-var b, c, d = twoResults() // ERROR "assignment mismatch: 3 variables but twoResults returns 2 values"
-var e, f = oneResult()     // ERROR "assignment mismatch: 2 variables but oneResult returns 1 values"
+var a = twoResults()       // ERROR "assignment mismatch: 1 variable but twoResults returns 2 values|2\-valued"
+var b, c, d = twoResults() // ERROR "assignment mismatch: 3 variables but twoResults returns 2 values|cannot initialize"
+var e, f = oneResult()     // ERROR "assignment mismatch: 2 variables but oneResult returns 1 values|cannot initialize"
 
 func twoResults() (int, int) {
        return 1, 2
index bea1898304b845642bfb550f39b2d82110daaf44..ec650848ae2e2dda9a246bb287c00c4997a423c2 100644 (file)
@@ -11,5 +11,5 @@ package p
 import "unsafe"
 
 func f() {
-       _ = complex(1<<uintptr(unsafe.Pointer(nil)), 0) // ERROR "invalid operation: .*shift of type float64.*"
+       _ = complex(1<<uintptr(unsafe.Pointer(nil)), 0) // ERROR "invalid operation: .*shift of type float64.*|shifted operand .* must be integer"
 }
index 1a1183b2912f63c4b6501358e6d20a4c8ff206fd..1fae40ad0809637d32e7ee4cdf12eb69cf896484 100644 (file)
@@ -6,13 +6,13 @@
 
 package p
 
-func f(a, b, c, d ...int)       {} // ERROR "non-final parameter a"
-func g(a ...int, b ...int)      {} // ERROR "non-final parameter a"
-func h(...int, ...int, float32) {} // ERROR "non-final parameter"
+func f(a, b, c, d ...int)       {} // ERROR "non-final parameter a|can only use ... with final parameter"
+func g(a ...int, b ...int)      {} // ERROR "non-final parameter a|can only use ... with final parameter"
+func h(...int, ...int, float32) {} // ERROR "non-final parameter|can only use ... with final parameter"
 
-type a func(...float32, ...interface{}) // ERROR "non-final parameter"
+type a func(...float32, ...interface{}) // ERROR "non-final parameter|can only use ... with final parameter"
 type b interface {
-       f(...int, ...int)                // ERROR "non-final parameter"
-       g(a ...int, b ...int, c float32) // ERROR "non-final parameter a"
+       f(...int, ...int)                // ERROR "non-final parameter|can only use ... with final parameter"
+       g(a ...int, b ...int, c float32) // ERROR "non-final parameter a|can only use ... with final parameter"
        valid(...int)
 }
index 8223c855cd04fc0f5a71042331ff7a47bde1f169..ae977e65f97136112069bae16764684f13fffe4a 100644 (file)
@@ -7,6 +7,7 @@
 package main
 
 func main() {
-       var c, d = 1, 2, 3 // ERROR "assignment mismatch: 2 variables but 3 values"
-       var e, f, g = 1, 2 // ERROR "assignment mismatch: 3 variables but 2 values"
+       var c, d = 1, 2, 3 // ERROR "assignment mismatch: 2 variables but 3 values|extra init expr"
+       var e, f, g = 1, 2 // ERROR "assignment mismatch: 3 variables but 2 values|missing init expr"
+       _, _, _, _ = c, d, e, f
 }
index dc12364d80fd23479b07b03a475de2fdff93bd4b..c9280b689f8b34e0682d307c71e1616b049a9446 100644 (file)
@@ -7,8 +7,9 @@
 package main
 
 func main() {
-       var a, b = 1    // ERROR "assignment mismatch: 2 variables but 1 values"
-       _ = 1, 2        // ERROR "assignment mismatch: 1 variables but 2 values"
-       c, d := 1       // ERROR "assignment mismatch: 2 variables but 1 values"
-       e, f := 1, 2, 3 // ERROR "assignment mismatch: 2 variables but 3 values"
+       var a, b = 1    // ERROR "assignment mismatch: 2 variables but 1 values|cannot initialize"
+       _ = 1, 2        // ERROR "assignment mismatch: 1 variables but 2 values|cannot assign"
+       c, d := 1       // ERROR "assignment mismatch: 2 variables but 1 values|cannot initialize"
+       e, f := 1, 2, 3 // ERROR "assignment mismatch: 2 variables but 3 values|cannot initialize"
+       _, _, _, _ = c, d, e, f
 }
index 3cbdbf962aac1824c0af99fb6ec5e8bbbc20a4e6..eb6c4ce80700edef124fcc63dc835b9d1cf0c2b1 100644 (file)
@@ -10,5 +10,5 @@ package p
 
 var s = []string{
        1: "dup",
-       1: "dup", // ERROR "duplicate index in slice literal: 1"
+       1: "dup", // ERROR "duplicate index in slice literal: 1|duplicate index 1 in array or slice literal"
 }
index 11edef7f2532d5078a2864f69e065c6e3b27c9d8..c0707ef6dc7be603a6f2b141cdf0f6715764a9b3 100644 (file)
@@ -13,5 +13,5 @@ const (
        _ = int(complex64(int(0)))
        _ = float64(complex128(float64(0)))
 
-       _ = int8(complex128(1000)) // ERROR "overflow"
+       _ = int8(complex128(1000)) // ERROR "overflow|cannot convert"
 )
index 83a3bc6fad6e0181fa9d3d008695fbf7b0b846fc..78a91653549b6c5a4c43dbb2a77aac5e93c4bbe9 100644 (file)
@@ -10,7 +10,7 @@ type t struct{ x int }
 
 func f1() {
        t{}.M()     // ERROR "t{}.M undefined \(type t has no field or method M\)"
-       t{x: 1}.M() // ERROR "t{...}.M undefined \(type t has no field or method M\)"
+       t{x: 1}.M() // ERROR "t{(...|…)}.M undefined \(type t has no field or method M\)"
 }
 
 func f2() (*t, error) {
index 628c222685efbb34839cc5a9a71be11d4994c0fd..f0851878ec7268bfc12ab2bb936eb09179981061 100644 (file)
@@ -18,6 +18,6 @@ var _ = map[string]string{
 var _ = []string{
        "foo",
        "bar",
-       20, // ERROR "cannot use|incompatible type"
+       20, // ERROR "cannot use|incompatible type|cannot convert"
 }
 
index 200290a081d1fa40c50bf97242f2ac6ca3dd9da8..bf97c9e4494548e1538182b2ae15e9181590d387 100644 (file)
@@ -10,9 +10,9 @@ type T []int
 
 func main() {
        _ = make(T, -1)    // ERROR "negative"
-       _ = make(T, 0.5)   // ERROR "constant 0.5 truncated to integer|non-integer len argument"
+       _ = make(T, 0.5)   // ERROR "constant 0.5 truncated to integer|non-integer len argument|truncated to int"
        _ = make(T, 1.0)   // ok
-       _ = make(T, 1<<63) // ERROR "len argument too large"
-       _ = make(T, 0, -1) // ERROR "negative cap"
-       _ = make(T, 10, 0) // ERROR "len larger than cap"
+       _ = make(T, 1<<63) // ERROR "len argument too large|overflows int"
+       _ = make(T, 0, -1) // ERROR "negative cap|must not be negative"
+       _ = make(T, 10, 0) // ERROR "len larger than cap|length and capacity swapped"
 }
index b8bd81274f8526162f9c1551d540a551161606b1..b501be2fbe8f48238ac7cb2b64264aceaf66cfb2 100644 (file)
@@ -7,5 +7,5 @@
 package p
 
 func f() [2]int {
-       return [...]int{2: 0} // ERROR "cannot use \[\.\.\.\]int{...} \(type \[3\]int\)"
+       return [...]int{2: 0} // ERROR "cannot use \[\.\.\.\]int{...} \(type \[3\]int\)|cannot use"
 }
index 2b441db8037f7f8f7a59e5d97fad8b6eb2021624..51646540b7df2ba69309aa22d2b9f09d5dc484b2 100644 (file)
@@ -10,5 +10,5 @@ func f(...int) {}
 
 func g() {
        var x []int
-       f(x, x...) // ERROR "have \(\[\]int, \.\.\.int\)"
+       f(x, x...) // ERROR "have \(\[\]int, \.\.\.int\)|too many arguments in call to f"
 }
index d1e4efc8fd9f0d9bfce0d46e8b3689aa10bf1c24..bd51de29bef97254e93c7acdb9ae25a02b197d1b 100644 (file)
@@ -13,8 +13,8 @@ type s struct {
 func f() {
        var x *s
 
-       _ = x == nil || len(x.slice) // ERROR "invalid operation: .+ \(operator \|\| not defined on int\)"
-       _ = len(x.slice) || x == nil // ERROR "invalid operation: .+ \(operator \|\| not defined on int\)"
-       _ = x == nil && len(x.slice) // ERROR "invalid operation: .+ \(operator && not defined on int\)"
-       _ = len(x.slice) && x == nil // ERROR "invalid operation: .+ \(operator && not defined on int\)"
+       _ = x == nil || len(x.slice) // ERROR "invalid operation: .+ \(operator \|\| not defined on int\)|cannot convert x == nil"
+       _ = len(x.slice) || x == nil // ERROR "invalid operation: .+ \(operator \|\| not defined on int\)|cannot convert x == nil"
+       _ = x == nil && len(x.slice) // ERROR "invalid operation: .+ \(operator && not defined on int\)|cannot convert x == nil"
+       _ = len(x.slice) && x == nil // ERROR "invalid operation: .+ \(operator && not defined on int\)|cannot convert x == nil"
 }
index 795d48d7f557c552025bac9c0b92676ff6f4f8a1..df986c179d7e6012830d13a6fa261f8fa3a72b4d 100644 (file)
@@ -7,28 +7,28 @@
 package main
 
 func foo() (int, int) {
-       return 2.3 // ERROR "not enough arguments to return\n\thave \(number\)\n\twant \(int, int\)"
+       return 2.3 // ERROR "not enough arguments to return\n\thave \(number\)\n\twant \(int, int\)|wrong number of return values"
 }
 
 func foo2() {
-       return int(2), 2 // ERROR "too many arguments to return\n\thave \(int, number\)\n\twant \(\)"
+       return int(2), 2 // ERROR "too many arguments to return\n\thave \(int, number\)\n\twant \(\)|no result values expected"
 }
 
 func foo3(v int) (a, b, c, d int) {
        if v >= 0 {
-               return 1 // ERROR "not enough arguments to return\n\thave \(number\)\n\twant \(int, int, int, int\)"
+               return 1 // ERROR "not enough arguments to return\n\thave \(number\)\n\twant \(int, int, int, int\)|wrong number of return values"
        }
-       return 2, 3 // ERROR "not enough arguments to return\n\thave \(number, number\)\n\twant \(int, int, int, int\)"
+       return 2, 3 // ERROR "not enough arguments to return\n\thave \(number, number\)\n\twant \(int, int, int, int\)|wrong number of return values"
 }
 
 func foo4(name string) (string, int) {
        switch name {
        case "cow":
-               return "moo" // ERROR "not enough arguments to return\n\thave \(string\)\n\twant \(string, int\)"
+               return "moo" // ERROR "not enough arguments to return\n\thave \(string\)\n\twant \(string, int\)|wrong number of return values"
        case "dog":
-               return "dog", 10, true // ERROR "too many arguments to return\n\thave \(string, number, bool\)\n\twant \(string, int\)"
+               return "dog", 10, true // ERROR "too many arguments to return\n\thave \(string, number, bool\)\n\twant \(string, int\)|wrong number of return values"
        case "fish":
-               return "" // ERROR "not enough arguments to return\n\thave \(string\)\n\twant \(string, int\)"
+               return "" // ERROR "not enough arguments to return\n\thave \(string\)\n\twant \(string, int\)|wrong number of return values"
        default:
                return "lizard", 10
        }
@@ -40,14 +40,14 @@ type U float64
 
 func foo5() (S, T, U) {
        if false {
-               return "" // ERROR "not enough arguments to return\n\thave \(string\)\n\twant \(S, T, U\)"
+               return "" // ERROR "not enough arguments to return\n\thave \(string\)\n\twant \(S, T, U\)|wrong number of return values"
        } else {
                ptr := new(T)
-               return ptr // ERROR "not enough arguments to return\n\thave \(\*T\)\n\twant \(S, T, U\)"
+               return ptr // ERROR "not enough arguments to return\n\thave \(\*T\)\n\twant \(S, T, U\)|wrong number of return values"
        }
-       return new(S), 12.34, 1 + 0i, 'r', true // ERROR "too many arguments to return\n\thave \(\*S, number, number, number, bool\)\n\twant \(S, T, U\)"
+       return new(S), 12.34, 1 + 0i, 'r', true // ERROR "too many arguments to return\n\thave \(\*S, number, number, number, bool\)\n\twant \(S, T, U\)|wrong number of return values"
 }
 
 func foo6() (T, string) {
-       return "T", true, true // ERROR "too many arguments to return\n\thave \(string, bool, bool\)\n\twant \(T, string\)"
+       return "T", true, true // ERROR "too many arguments to return\n\thave \(string, bool, bool\)\n\twant \(T, string\)|wrong number of return values"
 }
index d11ce51b97109e7bb0ba67e3f5bc92d582ddf1e0..81e3edf5e3fb6e5746279964d5c2c6b6ad292206 100644 (file)
@@ -9,13 +9,13 @@
 package p
 
 func F1(s []byte) []byte {
-       return s[2:1]           // ERROR "invalid slice index|inverted slice range"
+       return s[2:1]           // ERROR "invalid slice index|inverted slice range|invalid slice indices"
 }
 
 func F2(a [10]byte) []byte {
-       return a[2:1]           // ERROR "invalid slice index|inverted slice range"
+       return a[2:1]           // ERROR "invalid slice index|inverted slice range|invalid slice indices"
 }
 
 func F3(s string) string {
-       return s[2:1]           // ERROR "invalid slice index|inverted slice range"
+       return s[2:1]           // ERROR "invalid slice index|inverted slice range|invalid slice indices"
 }
index 9eb2e0f9c2ad31b2b273fdf24bbb5a864aaea5d6..3af6f9761b3746d05083524eca69ccf5839102db 100644 (file)
@@ -12,5 +12,5 @@ type a struct {
 
 func main() {
   av := a{};
-  _ = *a(av); // ERROR "invalid indirect|expected pointer"
+  _ = *a(av); // ERROR "invalid indirect|expected pointer|cannot indirect"
 }
index 98ffea79dc443bc14fb5125d5b20d3743aa35900..3ae9910d9e40199a5c500afe98c9acbbfeb5e19e 100644 (file)
@@ -16,5 +16,5 @@ func (T) foo() {}
 func main() {
        av := T{}
        pav := &av
-       (**T).foo(&pav) // ERROR "no method foo|requires named type or pointer to named"
+       (**T).foo(&pav) // ERROR "no method foo|requires named type or pointer to named|undefined"
 }
index d92247845585a7e6bb65d5fb970d4d861ed5058f..1dc556380ea96b8eb7760f680477f510d7cc9cf3 100644 (file)
@@ -13,4 +13,5 @@ func main() {
        switch (i.(type)) { // ERROR "outside type switch"
        default:
        }
+       _ = i
 }
index 197c225c6f06b3d8799474c86e1f2f8ecdb94564..d732e1fa1df5dc39784847dd98f90334a74420e6 100644 (file)
@@ -6,4 +6,4 @@
 
 package p
 
-import init "fmt" // ERROR "cannot import package as init"
+import init "fmt" // ERROR "cannot import package as init|cannot declare init"
index 09e1b850990c84f729cab9c2d472af7136883f23..27ae29438fbada6b5b674d0192a520981dbe19f8 100644 (file)
@@ -27,8 +27,8 @@ type B struct {
 var t T
 var p *T
 
-const N1 = unsafe.Offsetof(t.X)      // ERROR "indirection"
-const N2 = unsafe.Offsetof(p.X)      // ERROR "indirection"
+const N1 = unsafe.Offsetof(t.X)      // ERROR "indirection|field X is embedded via a pointer in T"
+const N2 = unsafe.Offsetof(p.X)      // ERROR "indirection|field X is embedded via a pointer in T"
 const N3 = unsafe.Offsetof(t.B.X)    // valid
 const N4 = unsafe.Offsetof(p.B.X)    // valid
 const N5 = unsafe.Offsetof(t.Method) // ERROR "method value"
index 8e1b06974c1d0ea50a98c4ee1ad6981a1cb52133..1932c9e6102a1cd070c8479c5feddda17a914150 100644 (file)
@@ -769,8 +769,10 @@ func (t *test) run() {
                        for _, pattern := range []string{
                                "-+",
                                "-0",
+                               "-e=0",
                                "-m",
                                "-live",
+                               "-std",
                                "wb",
                                "append",
                                "slice",
@@ -1942,140 +1944,88 @@ var excluded = map[string]bool{
        "switch7.go":      true,
        "typecheck.go":    true, // invalid function is not causing errors when called
 
-       "fixedbugs/bug163.go":      true,
-       "fixedbugs/bug176.go":      true,
-       "fixedbugs/bug192.go":      true,
-       "fixedbugs/bug193.go":      true,
-       "fixedbugs/bug195.go":      true,
-       "fixedbugs/bug213.go":      true,
-       "fixedbugs/bug228.go":      true,
-       "fixedbugs/bug229.go":      true,
-       "fixedbugs/bug231.go":      true,
-       "fixedbugs/bug251.go":      true,
-       "fixedbugs/bug255.go":      true,
-       "fixedbugs/bug256.go":      true,
-       "fixedbugs/bug325.go":      true,
-       "fixedbugs/bug326.go":      true,
-       "fixedbugs/bug340.go":      true,
-       "fixedbugs/bug342.go":      true,
-       "fixedbugs/bug350.go":      true,
-       "fixedbugs/bug351.go":      true,
-       "fixedbugs/bug353.go":      true,
-       "fixedbugs/bug357.go":      true,
-       "fixedbugs/bug362.go":      true,
-       "fixedbugs/bug371.go":      true,
-       "fixedbugs/bug374.go":      true,
-       "fixedbugs/bug379.go":      true,
-       "fixedbugs/bug383.go":      true,
-       "fixedbugs/bug385_64.go":   true,
-       "fixedbugs/bug386.go":      true,
-       "fixedbugs/bug388.go":      true,
-       "fixedbugs/bug389.go":      true,
-       "fixedbugs/bug390.go":      true,
-       "fixedbugs/bug397.go":      true,
-       "fixedbugs/bug412.go":      true,
-       "fixedbugs/bug413.go":      true,
-       "fixedbugs/bug416.go":      true,
-       "fixedbugs/bug418.go":      true,
-       "fixedbugs/bug459.go":      true,
-       "fixedbugs/bug462.go":      true,
-       "fixedbugs/bug463.go":      true,
-       "fixedbugs/bug487.go":      true,
-       "fixedbugs/issue11362.go":  true,
-       "fixedbugs/issue11590.go":  true,
-       "fixedbugs/issue11610.go":  true,
+       "fixedbugs/bug163.go":    true,
+       "fixedbugs/bug176.go":    true,
+       "fixedbugs/bug192.go":    true,
+       "fixedbugs/bug193.go":    true,
+       "fixedbugs/bug195.go":    true,
+       "fixedbugs/bug213.go":    true,
+       "fixedbugs/bug228.go":    true,
+       "fixedbugs/bug229.go":    true,
+       "fixedbugs/bug231.go":    true,
+       "fixedbugs/bug251.go":    true,
+       "fixedbugs/bug255.go":    true,
+       "fixedbugs/bug256.go":    true,
+       "fixedbugs/bug325.go":    true,
+       "fixedbugs/bug326.go":    true,
+       "fixedbugs/bug340.go":    true,
+       "fixedbugs/bug342.go":    true,
+       "fixedbugs/bug350.go":    true,
+       "fixedbugs/bug351.go":    true,
+       "fixedbugs/bug353.go":    true,
+       "fixedbugs/bug357.go":    true,
+       "fixedbugs/bug362.go":    true,
+       "fixedbugs/bug371.go":    true,
+       "fixedbugs/bug374.go":    true,
+       "fixedbugs/bug379.go":    true,
+       "fixedbugs/bug383.go":    true,
+       "fixedbugs/bug385_64.go": true,
+       "fixedbugs/bug386.go":    true,
+       "fixedbugs/bug388.go":    true,
+       "fixedbugs/bug389.go":    true,
+       "fixedbugs/bug390.go":    true,
+       "fixedbugs/bug397.go":    true,
+       "fixedbugs/bug412.go":    true,
+       "fixedbugs/bug413.go":    true,
+       "fixedbugs/bug416.go":    true,
+       "fixedbugs/bug418.go":    true,
+       "fixedbugs/bug459.go":    true,
+       "fixedbugs/bug462.go":    true,
+       "fixedbugs/bug463.go":    true,
+       "fixedbugs/bug487.go":    true,
+
+       "fixedbugs/issue11362.go":  true, // types2 import path handling
+       "fixedbugs/issue11590.go":  true, // types2 doesn't report a follow-on error (pref: types2)
+       "fixedbugs/issue11610.go":  true, // types2 not run after syntax errors
        "fixedbugs/issue11614.go":  true, // types2 reports an extra error
        "fixedbugs/issue13415.go":  true, // declared but not used conflict
        "fixedbugs/issue14520.go":  true, // missing import path error by types2
        "fixedbugs/issue14540.go":  true, // types2 is missing a fallthrough error
        "fixedbugs/issue16428.go":  true, // types2 reports two instead of one error
-       "fixedbugs/issue17038.go":  true,
-       "fixedbugs/issue17588.go":  true,
-       "fixedbugs/issue17631.go":  true,
-       "fixedbugs/issue17645.go":  true,
-       "fixedbugs/issue18331.go":  true,
-       "fixedbugs/issue18392.go":  true,
-       "fixedbugs/issue18393.go":  true,
-       "fixedbugs/issue19012.go":  true,
-       "fixedbugs/issue19323.go":  true,
-       "fixedbugs/issue19482.go":  true,
-       "fixedbugs/issue19699b.go": true,
-       "fixedbugs/issue19880.go":  true,
-       "fixedbugs/issue19947.go":  true,
-       "fixedbugs/issue20185.go":  true,
-       "fixedbugs/issue20227.go":  true,
-       "fixedbugs/issue20233.go":  true,
-       "fixedbugs/issue20245.go":  true,
-       "fixedbugs/issue20298.go":  true,
-       "fixedbugs/issue20415.go":  true,
-       "fixedbugs/issue20529.go":  true,
-       "fixedbugs/issue20749.go":  true,
-       "fixedbugs/issue20780.go":  true,
-       "fixedbugs/issue21273.go":  true,
-       "fixedbugs/issue21882.go":  true,
-       "fixedbugs/issue21979.go":  true,
-       "fixedbugs/issue22200.go":  true,
-       "fixedbugs/issue22200b.go": true,
-       "fixedbugs/issue22389.go":  true,
-       "fixedbugs/issue22794.go":  true,
-       "fixedbugs/issue22822.go":  true,
-       "fixedbugs/issue22904.go":  true,
-       "fixedbugs/issue22921.go":  true,
-       "fixedbugs/issue23093.go":  true,
-       "fixedbugs/issue23094.go":  true,
-       "fixedbugs/issue23609.go":  true,
-       "fixedbugs/issue23732.go":  true,
-       "fixedbugs/issue23823.go":  true,
-       "fixedbugs/issue24339.go":  true,
-       "fixedbugs/issue24470.go":  true,
-       "fixedbugs/issue25507.go":  true,
-       "fixedbugs/issue25727.go":  true,
-       "fixedbugs/issue25958.go":  true,
-       "fixedbugs/issue26416.go":  true,
-       "fixedbugs/issue26616.go":  true,
-       "fixedbugs/issue27595.go":  true,
-       "fixedbugs/issue28079b.go": true,
-       "fixedbugs/issue28079c.go": true,
-       "fixedbugs/issue28268.go":  true,
-       "fixedbugs/issue28450.go":  true,
-       "fixedbugs/issue29855.go":  true,
-       "fixedbugs/issue30085.go":  true,
-       "fixedbugs/issue30087.go":  true,
-       "fixedbugs/issue31747.go":  true,
-       "fixedbugs/issue32133.go":  true,
-       "fixedbugs/issue32723.go":  true,
-       "fixedbugs/issue33460.go":  true,
-       "fixedbugs/issue34329.go":  true,
-       "fixedbugs/issue35291.go":  true,
-       "fixedbugs/issue38117.go":  true,
-       "fixedbugs/issue38745.go":  true,
-       "fixedbugs/issue3925.go":   true,
-       "fixedbugs/issue4085a.go":  true,
-       "fixedbugs/issue41247.go":  true,
-       "fixedbugs/issue41440.go":  true,
-       "fixedbugs/issue41500.go":  true,
-       "fixedbugs/issue41575.go":  true,
-       "fixedbugs/issue42058a.go": true,
-       "fixedbugs/issue42058b.go": true,
-       "fixedbugs/issue42075.go":  true,
-       "fixedbugs/issue4215.go":   true,
-       "fixedbugs/issue4232.go":   true,
-       "fixedbugs/issue4251.go":   true,
-       "fixedbugs/issue4429.go":   true,
-       "fixedbugs/issue4452.go":   true,
-       "fixedbugs/issue4458.go":   true,
-       "fixedbugs/issue4470.go":   true,
-       "fixedbugs/issue4517d.go":  true,
-       "fixedbugs/issue4847.go":   true,
-       "fixedbugs/issue4909a.go":  true,
+       "fixedbugs/issue17038.go":  true, // types2 doesn't report a follow-on error (pref: types2)
+       "fixedbugs/issue17645.go":  true, // multiple errors on same line
+       "fixedbugs/issue18393.go":  true, // types2 not run after syntax errors
+       "fixedbugs/issue19012.go":  true, // multiple errors on same line
+       "fixedbugs/issue20233.go":  true, // types2 reports two instead of one error (pref: compiler)
+       "fixedbugs/issue20245.go":  true, // types2 reports two instead of one error (pref: compiler)
+       "fixedbugs/issue20529.go":  true, // types2 doesn't produce "stack frame too large" error
+       "fixedbugs/issue20780.go":  true, // types2 doesn't produce "stack frame too large" error
+       "fixedbugs/issue21979.go":  true, // types2 doesn't report a follow-on error (pref: types2)
+       "fixedbugs/issue22200.go":  true, // types2 doesn't produce "stack frame too large" error
+       "fixedbugs/issue22200b.go": true, // types2 doesn't produce "stack frame too large" error
+       "fixedbugs/issue23732.go":  true, // types2 reports different (but ok) line numbers
+       "fixedbugs/issue24339.go":  true, // types2 reports wrong line number
+       "fixedbugs/issue25507.go":  true, // types2 doesn't produce "stack frame too large" error
+       "fixedbugs/issue25958.go":  true, // types2 doesn't report a follow-on error (pref: types2)
+       "fixedbugs/issue28079b.go": true, // types2 reports follow-on errors
+       "fixedbugs/issue28268.go":  true, // types2 reports follow-on errors
+       "fixedbugs/issue31747.go":  true, // types2 is missing support for -lang flag
+       "fixedbugs/issue32133.go":  true, // types2 line numbers off?
+       "fixedbugs/issue33460.go":  true, // types2 reports alternative positions in separate error
+       "fixedbugs/issue34329.go":  true, // types2 is missing support for -lang flag
+       "fixedbugs/issue41575.go":  true, // types2 reports alternative positions in separate error
+       "fixedbugs/issue42058a.go": true, // types2 doesn't report "channel element type too large"
+       "fixedbugs/issue42058b.go": true, // types2 doesn't report "channel element type too large"
+       "fixedbugs/issue4232.go":   true, // types2 reports (correct) extra errors
+       "fixedbugs/issue4452.go":   true, // types2 reports (correct) extra errors
        "fixedbugs/issue5609.go":   true, // types2 needs a better error message
        "fixedbugs/issue6500.go":   true, // compiler -G is not reporting an error (but types2 does)
        "fixedbugs/issue6889.go":   true, // types2 can handle this without constant overflow
-       "fixedbugs/issue7525.go":   true, // init cycle error on different line - ok otherwise
-       "fixedbugs/issue7525b.go":  true, // init cycle error on different line - ok otherwise
-       "fixedbugs/issue7525c.go":  true, // init cycle error on different line - ok otherwise
-       "fixedbugs/issue7525d.go":  true, // init cycle error on different line - ok otherwise
-       "fixedbugs/issue7525e.go":  true, // init cycle error on different line - ok otherwise
-       "fixedbugs/issue7742.go":   true, // type-checking doesn't terminate
-       "fixedbugs/issue7746.go":   true, // type-checking doesn't terminate
+       "fixedbugs/issue7525.go":   true, // types2 reports init cycle error on different line - ok otherwise
+       "fixedbugs/issue7525b.go":  true, // types2 reports init cycle error on different line - ok otherwise
+       "fixedbugs/issue7525c.go":  true, // types2 reports init cycle error on different line - ok otherwise
+       "fixedbugs/issue7525d.go":  true, // types2 reports init cycle error on different line - ok otherwise
+       "fixedbugs/issue7525e.go":  true, // types2 reports init cycle error on different line - ok otherwise
+       "fixedbugs/issue7742.go":   true, // types2 type-checking doesn't terminate
+       "fixedbugs/issue7746.go":   true, // types2 type-checking doesn't terminate
 }