From 5a25a3fd1d8248c039e34f5ae02cc9c8198fc6d6 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Mon, 14 Dec 2020 13:26:35 -0800 Subject: [PATCH] test: recognize gofrontend error messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixedbugs/issue26416.go:24:16: error: unknown field ‘t1f1’ in ‘t2’ fixedbugs/issue26416.go:25:16: error: unknown field ‘t1f2’ in ‘t3’ fixedbugs/issue26416.go:26:16: error: unknown field ‘t2f1’ in ‘t3’ fixedbugs/issue26616.go:15:9: error: single variable set to multiple-value function call fixedbugs/issue26616.go:9:5: error: incompatible type in initialization (multiple-value function call in single-value context) fixedbugs/issue26616.go:12:13: error: incompatible type in initialization (multiple-value function call in single-value context) fixedbugs/issue26616.go:13:13: error: incompatible type in initialization (multiple-value function call in single-value context) fixedbugs/issue26616.go:15:9: error: incompatible type in initialization (multiple-value function call in single-value context) fixedbugs/issue26616.go:14:11: error: incompatible types in assignment (multiple-value function call in single-value context) fixedbugs/issue26855.go:23:12: error: incompatible type for field 1 in struct construction fixedbugs/issue26855.go:27:12: error: incompatible type for field 1 in struct construction fixedbugs/issue25958.go:14:18: error: expected ‘<-’ or ‘=’ fixedbugs/issue25958.go:15:35: error: expected ‘<-’ or ‘=’ fixedbugs/issue28079b.go:13:9: error: array bound is not constant fixedbugs/issue28079b.go:16:22: error: invalid context-determined non-integer type for left operand of shift fixedbugs/issue28079c.go:14:22: error: invalid context-determined non-integer type for left operand of shift fixedbugs/issue28450.go:9:19: error: ‘...’ only permits one name fixedbugs/issue28450.go:10:18: error: ‘...’ must be last parameter fixedbugs/issue28450.go:11:16: error: ‘...’ must be last parameter fixedbugs/issue28450.go:11:24: error: ‘...’ must be last parameter fixedbugs/issue28450.go:13:25: error: ‘...’ must be last parameter fixedbugs/issue28450.go:15:19: error: ‘...’ must be last parameter fixedbugs/issue28450.go:16:21: error: ‘...’ must be last parameter fixedbugs/issue28450.go:16:31: error: ‘...’ must be last parameter fixedbugs/issue28268.go:20:1: error: method ‘E’ redeclares struct field name fixedbugs/issue28268.go:19:1: error: method ‘b’ redeclares struct field name fixedbugs/issue27356.go:14:14: error: expected function fixedbugs/issue27356.go:18:9: error: expected function fixedbugs/issue29855.go:13:11: error: unknown field ‘Name’ in ‘T’ fixedbugs/issue27938.go:14:15: error: expected package fixedbugs/issue27938.go:18:13: error: expected package fixedbugs/issue27938.go:22:13: error: expected package fixedbugs/issue27938.go:22:9: error: expected signature or type name fixedbugs/issue29870b.go:13:9: error: ‘x’ declared but not used fixedbugs/issue30085.go:10:18: error: wrong number of initializations fixedbugs/issue30085.go:11:21: error: wrong number of initializations fixedbugs/issue30087.go:10:18: error: wrong number of initializations fixedbugs/issue30087.go:11:11: error: number of variables does not match number of values fixedbugs/issue30087.go:12:9: error: wrong number of initializations fixedbugs/issue30087.go:13:9: error: wrong number of initializations fixedbugs/issue28926.go:16:14: error: use of undefined type ‘G’ fixedbugs/issue28926.go:18:14: error: use of undefined type ‘E’ fixedbugs/issue28926.go:22:24: error: use of undefined type ‘T’ fixedbugs/issue30722.go:13:13: error: invalid numeric literal fixedbugs/issue30722.go:14:13: error: invalid numeric literal fixedbugs/issue30722.go:15:13: error: invalid numeric literal fixedbugs/issue33308.go:12:19: error: invalid context-determined non-integer type for left operand of shift fixedbugs/issue33386.go:16:9: error: expected operand fixedbugs/issue33386.go:22:9: error: expected operand fixedbugs/issue33386.go:26:17: error: expected operand fixedbugs/issue33386.go:27:18: error: expected operand fixedbugs/issue33386.go:28:29: error: expected operand fixedbugs/issue33386.go:15:17: error: reference to undefined name ‘send’ fixedbugs/issue33386.go:27:13: error: reference to undefined name ‘a’ fixedbugs/issue33386.go:21:19: error: value computed is not used fixedbugs/issue33460.go:34:10: error: duplicate key in map literal fixedbugs/issue33460.go:21:9: error: duplicate case in switch fixedbugs/issue33460.go:24:9: error: duplicate case in switch fixedbugs/issue33460.go:25:9: error: duplicate case in switch fixedbugs/issue32723.go:12:14: error: invalid comparison of non-ordered type fixedbugs/issue32723.go:13:13: error: invalid comparison of non-ordered type fixedbugs/issue32723.go:16:16: error: invalid comparison of non-ordered type fixedbugs/issue32723.go:17:16: error: invalid comparison of non-ordered type fixedbugs/issue32723.go:18:15: error: invalid comparison of non-ordered type fixedbugs/issue32723.go:21:15: error: invalid comparison of non-ordered type fixedbugs/issue35291.go:13:9: error: duplicate value for index 1 fixedbugs/issue38745.go:12:12: error: reference to undefined field or method ‘M’ fixedbugs/issue38745.go:13:16: error: reference to undefined field or method ‘M’ fixedbugs/issue38745.go:17:19: error: reference to undefined field or method ‘M’ fixedbugs/issue38745.go:17:9: error: not enough arguments to return fixedbugs/issue41500.go:16:22: error: incompatible types in binary expression fixedbugs/issue41500.go:17:26: error: incompatible types in binary expression fixedbugs/issue41500.go:18:22: error: incompatible types in binary expression fixedbugs/issue41500.go:19:26: error: incompatible types in binary expression fixedbugs/issue41575.go:23:6: error: invalid recursive type fixedbugs/issue41575.go:9:6: error: invalid recursive type ‘T1’ fixedbugs/issue41575.go:13:6: error: invalid recursive type ‘T2’ fixedbugs/issue41575.go:17:6: error: invalid recursive type ‘a’ fixedbugs/issue41575.go:18:6: error: invalid recursive type ‘b’ fixedbugs/issue41575.go:19:6: error: invalid recursive type ‘c’ fixedbugs/issue41575.go:25:6: error: invalid recursive type ‘g’ fixedbugs/issue41575.go:32:6: error: invalid recursive type ‘x’ fixedbugs/issue41575.go:33:6: error: invalid recursive type ‘y’ fixedbugs/issue4215.go:10:9: error: not enough arguments to return fixedbugs/issue4215.go:14:9: error: return with value in function with no return type fixedbugs/issue4215.go:19:17: error: not enough arguments to return fixedbugs/issue4215.go:21:9: error: not enough arguments to return fixedbugs/issue4215.go:27:17: error: not enough arguments to return fixedbugs/issue4215.go:29:17: error: too many values in return statement fixedbugs/issue4215.go:31:17: error: not enough arguments to return fixedbugs/issue4215.go:43:17: error: not enough arguments to return fixedbugs/issue4215.go:46:17: error: not enough arguments to return fixedbugs/issue4215.go:48:9: error: too many values in return statement fixedbugs/issue4215.go:52:9: error: too many values in return statement fixedbugs/issue41247.go:10:16: error: incompatible type for return value 1 fixedbugs/issue41440.go:13:9: error: too many arguments fixedbugs/issue6772.go:10:16: error: ‘a’ repeated on left side of := fixedbugs/issue6772.go:17:16: error: ‘a’ repeated on left side of := fixedbugs/issue6402.go:12:16: error: incompatible type for return value 1 fixedbugs/issue6403.go:13:23: error: reference to undefined identifier ‘syscall.X’ fixedbugs/issue6403.go:14:15: error: reference to undefined name ‘voidpkg’ fixedbugs/issue7746.go:24:20: error: constant multiplication overflow fixedbugs/issue7760.go:15:7: error: invalid constant type fixedbugs/issue7760.go:16:7: error: invalid constant type fixedbugs/issue7760.go:18:7: error: invalid constant type fixedbugs/issue7760.go:19:7: error: invalid constant type fixedbugs/issue7760.go:21:11: error: expression is not constant fixedbugs/issue7760.go:22:11: error: expression is not constant fixedbugs/issue7760.go:24:7: error: invalid constant type fixedbugs/issue7760.go:25:7: error: invalid constant type fixedbugs/issue7129.go:18:11: error: argument 1 has incompatible type (cannot use type bool as type int) fixedbugs/issue7129.go:19:11: error: argument 1 has incompatible type (cannot use type bool as type int) fixedbugs/issue7129.go:20:11: error: argument 1 has incompatible type (cannot use type bool as type int) fixedbugs/issue7129.go:20:17: error: argument 2 has incompatible type (cannot use type bool as type int) fixedbugs/issue7150.go:12:20: error: index expression is negative fixedbugs/issue7150.go:13:13: error: some element keys in composite literal are out of range fixedbugs/issue7150.go:14:13: error: some element keys in composite literal are out of range fixedbugs/issue7150.go:15:13: error: some element keys in composite literal are out of range fixedbugs/issue7150.go:16:13: error: some element keys in composite literal are out of range fixedbugs/issue7675.go:16:11: error: argument 1 has incompatible type (cannot use type int as type string) fixedbugs/issue7675.go:16:24: error: argument 3 has incompatible type (cannot use type string as type float64) fixedbugs/issue7675.go:16:9: error: not enough arguments fixedbugs/issue7675.go:16:14: error: floating-point constant truncated to integer fixedbugs/issue7675.go:18:11: error: argument 1 has incompatible type (cannot use type int as type string) fixedbugs/issue7675.go:18:24: error: argument 3 has incompatible type (cannot use type string as type float64) fixedbugs/issue7675.go:18:28: error: argument 4 has incompatible type (cannot use type int as type string) fixedbugs/issue7675.go:18:9: error: too many arguments fixedbugs/issue7675.go:18:14: error: floating-point constant truncated to integer fixedbugs/issue7675.go:19:11: error: argument 1 has incompatible type (cannot use type int as type string) fixedbugs/issue7675.go:19:9: error: not enough arguments fixedbugs/issue7675.go:19:14: error: floating-point constant truncated to integer fixedbugs/issue7675.go:21:11: error: argument 1 has incompatible type (cannot use type int as type string) fixedbugs/issue7675.go:21:19: error: argument 3 has incompatible type fixedbugs/issue7675.go:21:14: error: floating-point constant truncated to integer fixedbugs/issue7675.go:23:14: error: floating-point constant truncated to integer fixedbugs/issue7153.go:11:15: error: reference to undefined name ‘a’ fixedbugs/issue7153.go:11:18: error: incompatible type for element 1 in composite literal fixedbugs/issue7153.go:11:24: error: incompatible type for element 2 in composite literal fixedbugs/issue7310.go:12:13: error: left argument must be a slice fixedbugs/issue7310.go:13:13: error: second argument must be slice or string fixedbugs/issue7310.go:14:15: error: incompatible types in binary expression fixedbugs/issue6964.go:10:13: error: invalid type conversion (cannot use type complex128 as type string) fixedbugs/issue7538a.go:14:9: error: reference to undefined label ‘_’ fixedbugs/issue8311.go:14:9: error: increment or decrement of non-numeric type fixedbugs/issue8507.go:12:6: error: invalid recursive type ‘T’ fixedbugs/issue9521.go:16:20: error: argument 2 has incompatible type fixedbugs/issue9521.go:17:20: error: argument 2 has incompatible type (cannot use type float64 as type int) fixedbugs/issue8385.go:30:19: error: argument 1 has incompatible type (type has no methods) fixedbugs/issue8385.go:30:14: error: not enough arguments fixedbugs/issue8385.go:35:9: error: not enough arguments fixedbugs/issue8385.go:36:9: error: not enough arguments fixedbugs/issue8385.go:37:10: error: not enough arguments fixedbugs/issue8385.go:38:10: error: not enough arguments fixedbugs/issue8385.go:39:10: error: not enough arguments fixedbugs/issue8385.go:40:10: error: not enough arguments fixedbugs/issue8385.go:41:13: error: not enough arguments fixedbugs/issue8438.go:13:23: error: incompatible type for element 1 in composite literal fixedbugs/issue8438.go:14:22: error: incompatible type for element 1 in composite literal fixedbugs/issue8438.go:15:23: error: incompatible type for element 1 in composite literal fixedbugs/issue8440.go:10:9: error: reference to undefined name ‘n’ Change-Id: I5707aec7d3c9178c4f4d794d4827fc907b52efb3 Reviewed-on: https://go-review.googlesource.com/c/go/+/278032 Trust: Ian Lance Taylor Run-TryBot: Ian Lance Taylor TryBot-Result: Go Bot Reviewed-by: Cherry Zhang --- test/fixedbugs/issue25958.go | 4 ++-- test/fixedbugs/issue26416.go | 6 +++--- test/fixedbugs/issue26616.go | 10 +++++----- test/fixedbugs/issue26855.go | 4 ++-- test/fixedbugs/issue27356.go | 4 ++-- test/fixedbugs/issue27938.go | 6 +++--- test/fixedbugs/issue28079b.go | 4 ++-- test/fixedbugs/issue28079c.go | 2 +- test/fixedbugs/issue28268.go | 4 ++-- test/fixedbugs/issue28450.go | 12 ++++++------ test/fixedbugs/issue28926.go | 6 +++--- test/fixedbugs/issue29855.go | 2 +- test/fixedbugs/issue29870b.go | 2 +- test/fixedbugs/issue30085.go | 4 ++-- test/fixedbugs/issue30087.go | 8 ++++---- test/fixedbugs/issue30722.go | 6 +++--- test/fixedbugs/issue32723.go | 12 ++++++------ test/fixedbugs/issue33308.go | 2 +- test/fixedbugs/issue33386.go | 16 ++++++++-------- test/fixedbugs/issue33460.go | 12 ++++++------ test/fixedbugs/issue35291.go | 2 +- test/fixedbugs/issue38745.go | 6 +++--- test/fixedbugs/issue41247.go | 2 +- test/fixedbugs/issue41440.go | 2 +- test/fixedbugs/issue41500.go | 8 ++++---- test/fixedbugs/issue41575.go | 18 +++++++++--------- test/fixedbugs/issue42058a.go | 4 ++-- test/fixedbugs/issue42058b.go | 2 +- test/fixedbugs/issue4215.go | 22 +++++++++++----------- test/fixedbugs/issue6402.go | 2 +- test/fixedbugs/issue6403.go | 4 ++-- test/fixedbugs/issue6772.go | 4 ++-- test/fixedbugs/issue6889.go | 2 +- test/fixedbugs/issue6964.go | 2 +- test/fixedbugs/issue7129.go | 6 +++--- test/fixedbugs/issue7150.go | 10 +++++----- test/fixedbugs/issue7153.go | 2 +- test/fixedbugs/issue7310.go | 6 +++--- test/fixedbugs/issue7538a.go | 2 +- test/fixedbugs/issue7675.go | 10 +++++----- test/fixedbugs/issue7746.go | 4 ++-- test/fixedbugs/issue7760.go | 16 ++++++++-------- test/fixedbugs/issue8311.go | 2 +- test/fixedbugs/issue8385.go | 16 ++++++++-------- test/fixedbugs/issue8438.go | 6 +++--- test/fixedbugs/issue8440.go | 2 +- test/fixedbugs/issue8507.go | 2 +- test/fixedbugs/issue9521.go | 4 ++-- 48 files changed, 147 insertions(+), 147 deletions(-) diff --git a/test/fixedbugs/issue25958.go b/test/fixedbugs/issue25958.go index ba7ee82230..90fcee15fd 100644 --- a/test/fixedbugs/issue25958.go +++ b/test/fixedbugs/issue25958.go @@ -11,7 +11,7 @@ package p func f(done chan struct{}) { select { - case done: // ERROR "must be receive", "not used" - case (chan struct{})(done): // ERROR "must be receive" + case done: // ERROR "must be receive|expected .*<-.* or .*=" "not used" + case (chan struct{})(done): // ERROR "must be receive|expected .*<-.* or .*=" } } diff --git a/test/fixedbugs/issue26416.go b/test/fixedbugs/issue26416.go index bc37fd9d3a..44a4fc73b7 100644 --- a/test/fixedbugs/issue26416.go +++ b/test/fixedbugs/issue26416.go @@ -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" ) diff --git a/test/fixedbugs/issue26616.go b/test/fixedbugs/issue26616.go index e5565b68ca..87c0293661 100644 --- a/test/fixedbugs/issue26616.go +++ b/test/fixedbugs/issue26616.go @@ -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|multiple-value function call in single-value context" 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|multiple-value function call in single-value context" + var a int = three() // ERROR "assignment mismatch: 1 variable but three returns 3 values|multiple-value function call in single-value context" + a = three() // ERROR "assignment mismatch: 1 variable but three returns 3 values|multiple-value function call in single-value context" + b := three() // ERROR "assignment mismatch: 1 variable but three returns 3 values|single variable set to multiple-value|multiple-value function call in single-value context" _, _ = a, b } diff --git a/test/fixedbugs/issue26855.go b/test/fixedbugs/issue26855.go index 144e4415f7..b965635a65 100644 --- a/test/fixedbugs/issue26855.go +++ b/test/fixedbugs/issue26855.go @@ -20,9 +20,9 @@ type P struct { type T struct{} var _ = S{ - f: &T{}, // ERROR "cannot use &T{}" + f: &T{}, // ERROR "cannot use &T{}|incompatible type" } var _ = P{ - f: T{}, // ERROR "cannot use T{}" + f: T{}, // ERROR "cannot use T{}|incompatible type" } diff --git a/test/fixedbugs/issue27356.go b/test/fixedbugs/issue27356.go index 42784876a5..c3e686df33 100644 --- a/test/fixedbugs/issue27356.go +++ b/test/fixedbugs/issue27356.go @@ -11,9 +11,9 @@ package p var a = []int{1,2,3} func _(len int) { - _ = len(a) // ERROR "cannot call non-function" + _ = len(a) // ERROR "cannot call non-function|expected function" } var cap = false -var _ = cap(a) // ERROR "cannot call non-function" +var _ = cap(a) // ERROR "cannot call non-function|expected function" diff --git a/test/fixedbugs/issue27938.go b/test/fixedbugs/issue27938.go index b0007be928..ed974e642d 100644 --- a/test/fixedbugs/issue27938.go +++ b/test/fixedbugs/issue27938.go @@ -11,13 +11,13 @@ package p type _ struct { - F sync.Mutex // ERROR "undefined: sync" + F sync.Mutex // ERROR "undefined: sync|expected package" } type _ struct { - sync.Mutex // ERROR "undefined: sync" + sync.Mutex // ERROR "undefined: sync|expected package" } type _ interface { - sync.Mutex // ERROR "undefined: sync" + sync.Mutex // ERROR "undefined: sync|expected package|expected signature or type name" } diff --git a/test/fixedbugs/issue28079b.go b/test/fixedbugs/issue28079b.go index 47cc16dfb2..d1992e1d09 100644 --- a/test/fixedbugs/issue28079b.go +++ b/test/fixedbugs/issue28079b.go @@ -10,8 +10,8 @@ package p import "unsafe" -type T [uintptr(unsafe.Pointer(nil))]int // ERROR "non-constant array bound" +type T [uintptr(unsafe.Pointer(nil))]int // ERROR "non-constant array bound|array bound is not constant" func f() { - _ = complex(1<= 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\)|not enough arguments to return" } - 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\)|not enough arguments to return" } 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\)|not enough arguments to return" 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\)|too many values in return statement" 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\)|not enough arguments to return" 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\)|not enough arguments to return" } 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\)|not enough arguments to return" } - 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\)|too many values in return statement" } 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\)|too many values in return statement" } diff --git a/test/fixedbugs/issue6402.go b/test/fixedbugs/issue6402.go index da5980c9ab..ecde9ae510 100644 --- a/test/fixedbugs/issue6402.go +++ b/test/fixedbugs/issue6402.go @@ -9,5 +9,5 @@ package p func f() uintptr { - return nil // ERROR "cannot use nil as type uintptr in return argument" + return nil // ERROR "cannot use nil as type uintptr in return argument|incompatible type" } diff --git a/test/fixedbugs/issue6403.go b/test/fixedbugs/issue6403.go index b61e2e225d..809efefa0f 100644 --- a/test/fixedbugs/issue6403.go +++ b/test/fixedbugs/issue6403.go @@ -10,5 +10,5 @@ package p import "syscall" -const A int = syscall.X // ERROR "undefined: syscall.X" -const B int = voidpkg.X // ERROR "undefined: voidpkg" +const A int = syscall.X // ERROR "undefined: syscall.X|undefined identifier .*syscall.X" +const B int = voidpkg.X // ERROR "undefined: voidpkg|undefined name .*voidpkg" diff --git a/test/fixedbugs/issue6772.go b/test/fixedbugs/issue6772.go index 4d0001c870..5bd15ba72e 100644 --- a/test/fixedbugs/issue6772.go +++ b/test/fixedbugs/issue6772.go @@ -7,14 +7,14 @@ package p func f1() { - for a, a := range []int{1, 2, 3} { // ERROR "a repeated on left side of :=" + for a, a := range []int{1, 2, 3} { // ERROR "a.* repeated on left side of :=" println(a) } } func f2() { var a int - for a, a := range []int{1, 2, 3} { // ERROR "a repeated on left side of :=" + for a, a := range []int{1, 2, 3} { // ERROR "a.* repeated on left side of :=" println(a) } println(a) diff --git a/test/fixedbugs/issue6889.go b/test/fixedbugs/issue6889.go index 805a877d58..efd8b76148 100644 --- a/test/fixedbugs/issue6889.go +++ b/test/fixedbugs/issue6889.go @@ -107,5 +107,5 @@ const ( f96 = f95 * 96 f97 = f96 * 97 f98 = f97 * 98 - f99 = f98 * 99 // ERROR "overflow" + f99 = f98 * 99 // GC_ERROR "overflow" ) diff --git a/test/fixedbugs/issue6964.go b/test/fixedbugs/issue6964.go index 7ad83364ab..36a3c5bb40 100644 --- a/test/fixedbugs/issue6964.go +++ b/test/fixedbugs/issue6964.go @@ -7,5 +7,5 @@ package main func main() { - _ = string(-4 + 2i + 2) // ERROR "-4 \+ 2i" + _ = string(-4 + 2i + 2) // ERROR "-4 \+ 2i|invalid type conversion" } diff --git a/test/fixedbugs/issue7129.go b/test/fixedbugs/issue7129.go index 2425cbd343..2765200ac8 100644 --- a/test/fixedbugs/issue7129.go +++ b/test/fixedbugs/issue7129.go @@ -15,7 +15,7 @@ func g() bool { return true } func h(int, int) {} func main() { - f(g()) // ERROR "in argument to f" - f(true) // ERROR "in argument to f" - h(true, true) // ERROR "in argument to h" + f(g()) // ERROR "in argument to f|incompatible type" + f(true) // ERROR "in argument to f|incompatible type" + h(true, true) // ERROR "in argument to h|incompatible type" } diff --git a/test/fixedbugs/issue7150.go b/test/fixedbugs/issue7150.go index 8a8a7d088f..7cddf4875e 100644 --- a/test/fixedbugs/issue7150.go +++ b/test/fixedbugs/issue7150.go @@ -9,9 +9,9 @@ package main func main() { - _ = [0]int{-1: 50} // ERROR "index must be non-negative integer constant" - _ = [0]int{0: 0} // ERROR "index 0 out of bounds \[0:0\]" - _ = [0]int{5: 25} // ERROR "index 5 out of bounds \[0:0\]" - _ = [10]int{2: 10, 15: 30} // ERROR "index 15 out of bounds \[0:10\]" - _ = [10]int{5: 5, 1: 1, 12: 12} // ERROR "index 12 out of bounds \[0:10\]" + _ = [0]int{-1: 50} // ERROR "index must be non-negative integer constant|index expression is negative" + _ = [0]int{0: 0} // ERROR "index 0 out of bounds \[0:0\]|out of range" + _ = [0]int{5: 25} // ERROR "index 5 out of bounds \[0:0\]|out of range" + _ = [10]int{2: 10, 15: 30} // ERROR "index 15 out of bounds \[0:10\]|out of range" + _ = [10]int{5: 5, 1: 1, 12: 12} // ERROR "index 12 out of bounds \[0:10\]|out of range" } diff --git a/test/fixedbugs/issue7153.go b/test/fixedbugs/issue7153.go index 66b1338496..e8b95d5db8 100644 --- a/test/fixedbugs/issue7153.go +++ b/test/fixedbugs/issue7153.go @@ -8,4 +8,4 @@ package p -var _ = []int{a: true, true} // ERROR "undefined: a" "cannot use true \(type untyped bool\) as type int in slice literal" +var _ = []int{a: true, true} // ERROR "undefined: a" "cannot use true \(type untyped bool\) as type int in slice literal|undefined name .*a|incompatible type" diff --git a/test/fixedbugs/issue7310.go b/test/fixedbugs/issue7310.go index 6829d5e126..ba50e4237b 100644 --- a/test/fixedbugs/issue7310.go +++ b/test/fixedbugs/issue7310.go @@ -9,7 +9,7 @@ package main func main() { - _ = copy(nil, []int{}) // ERROR "use of untyped nil" - _ = copy([]int{}, nil) // ERROR "use of untyped nil" - _ = 1 + true // ERROR "mismatched types untyped int and untyped bool" + _ = copy(nil, []int{}) // ERROR "use of untyped nil|left argument must be a slice" + _ = copy([]int{}, nil) // ERROR "use of untyped nil|second argument must be slice or string" + _ = 1 + true // ERROR "mismatched types untyped int and untyped bool|incompatible types" } diff --git a/test/fixedbugs/issue7538a.go b/test/fixedbugs/issue7538a.go index 283d9eb1ba..b1701508d8 100644 --- a/test/fixedbugs/issue7538a.go +++ b/test/fixedbugs/issue7538a.go @@ -11,5 +11,5 @@ package p func f() { _: _: - goto _ // ERROR "not defined" + goto _ // ERROR "not defined|undefined label" } diff --git a/test/fixedbugs/issue7675.go b/test/fixedbugs/issue7675.go index d97ee357a2..6cda05f332 100644 --- a/test/fixedbugs/issue7675.go +++ b/test/fixedbugs/issue7675.go @@ -13,12 +13,12 @@ func f(string, int, float64, string) func g(string, int, float64, ...string) func main() { - f(1, 0.5, "hello") // ERROR "not enough arguments" + f(1, 0.5, "hello") // ERROR "not enough arguments|incompatible type" f("1", 2, 3.1, "4") - f(1, 0.5, "hello", 4, 5) // ERROR "too many arguments" - g(1, 0.5) // ERROR "not enough arguments" + f(1, 0.5, "hello", 4, 5) // ERROR "too many arguments|incompatible type" + g(1, 0.5) // ERROR "not enough arguments|incompatible type" g("1", 2, 3.1) - g(1, 0.5, []int{3, 4}...) // ERROR "not enough arguments" + g(1, 0.5, []int{3, 4}...) // ERROR "not enough arguments|incompatible type" g("1", 2, 3.1, "4", "5") - g(1, 0.5, "hello", 4, []int{5, 6}...) // ERROR "too many arguments" + g(1, 0.5, "hello", 4, []int{5, 6}...) // ERROR "too many arguments|truncated to integer" } diff --git a/test/fixedbugs/issue7746.go b/test/fixedbugs/issue7746.go index 0dc119d2e6..745496293d 100644 --- a/test/fixedbugs/issue7746.go +++ b/test/fixedbugs/issue7746.go @@ -10,7 +10,7 @@ const ( c0 = 1 << 100 c1 = c0 * c0 c2 = c1 * c1 - c3 = c2 * c2 // ERROR "overflow" + c3 = c2 * c2 // GC_ERROR "overflow" c4 = c3 * c3 c5 = c4 * c4 c6 = c5 * c5 @@ -21,7 +21,7 @@ const ( c11 = c10 * c10 c12 = c11 * c11 c13 = c12 * c12 - c14 = c13 * c13 + c14 = c13 * c13 // GCCGO_ERROR "overflow" c15 = c14 * c14 c16 = c15 * c15 c17 = c16 * c16 diff --git a/test/fixedbugs/issue7760.go b/test/fixedbugs/issue7760.go index cccae48910..7e1d03596e 100644 --- a/test/fixedbugs/issue7760.go +++ b/test/fixedbugs/issue7760.go @@ -12,14 +12,14 @@ import "unsafe" type myPointer unsafe.Pointer -const _ = unsafe.Pointer(uintptr(1)) // ERROR "is not (a )?constant" -const _ = myPointer(uintptr(1)) // ERROR "is not (a )?constant" +const _ = unsafe.Pointer(uintptr(1)) // ERROR "is not (a )?constant|invalid constant type" +const _ = myPointer(uintptr(1)) // ERROR "is not (a )?constant|invalid constant type" -const _ = (*int)(unsafe.Pointer(uintptr(1))) // ERROR "is not (a )?constant" -const _ = (*int)(myPointer(uintptr(1))) // ERROR "is not (a )?constant" +const _ = (*int)(unsafe.Pointer(uintptr(1))) // ERROR "is not (a )?constant|invalid constant type" +const _ = (*int)(myPointer(uintptr(1))) // ERROR "is not (a )?constant|invalid constant type" -const _ = uintptr(unsafe.Pointer(uintptr(1))) // ERROR "is not (a )?constant" -const _ = uintptr(myPointer(uintptr(1))) // ERROR "is not (a )?constant" +const _ = uintptr(unsafe.Pointer(uintptr(1))) // ERROR "is not (a )?constant|expression is not constant" +const _ = uintptr(myPointer(uintptr(1))) // ERROR "is not (a )?constant|expression is no constant" -const _ = []byte("") // ERROR "is not (a )?constant" -const _ = []rune("") // ERROR "is not (a )?constant" +const _ = []byte("") // ERROR "is not (a )?constant|invalid constant type" +const _ = []rune("") // ERROR "is not (a )?constant|invalid constant type" diff --git a/test/fixedbugs/issue8311.go b/test/fixedbugs/issue8311.go index 375b480a17..b5fd5daea1 100644 --- a/test/fixedbugs/issue8311.go +++ b/test/fixedbugs/issue8311.go @@ -11,6 +11,6 @@ package p func f() { var x []byte - x++ // ERROR "invalid operation: x[+][+]" + x++ // ERROR "invalid operation: x[+][+]|non-numeric type" } diff --git a/test/fixedbugs/issue8385.go b/test/fixedbugs/issue8385.go index 6447e9f0e8..f3d395e521 100644 --- a/test/fixedbugs/issue8385.go +++ b/test/fixedbugs/issue8385.go @@ -27,16 +27,16 @@ func (t T) M(x int) { func g() func(int) func main() { - Fooer.Foo(5, 6) // ERROR "not enough arguments in call to method expression Fooer.Foo" + Fooer.Foo(5, 6) // ERROR "not enough arguments in call to method expression Fooer.Foo|incompatible type|not enough arguments" var i I var t *T - g()() // ERROR "not enough arguments in call to g\(\)" - f() // ERROR "not enough arguments in call to f" - i.M() // ERROR "not enough arguments in call to i\.M" - I.M() // ERROR "not enough arguments in call to method expression I\.M" - t.M() // ERROR "not enough arguments in call to t\.M" - T.M() // ERROR "not enough arguments in call to method expression T\.M" - (*T).M() // ERROR "not enough arguments in call to method expression \(\*T\)\.M" + g()() // ERROR "not enough arguments in call to g\(\)|not enough arguments" + f() // ERROR "not enough arguments in call to f|not enough arguments" + i.M() // ERROR "not enough arguments in call to i\.M|not enough arguments" + I.M() // ERROR "not enough arguments in call to method expression I\.M|not enough arguments" + t.M() // ERROR "not enough arguments in call to t\.M|not enough arguments" + T.M() // ERROR "not enough arguments in call to method expression T\.M|not enough arguments" + (*T).M() // ERROR "not enough arguments in call to method expression \(\*T\)\.M|not enough arguments" } diff --git a/test/fixedbugs/issue8438.go b/test/fixedbugs/issue8438.go index 3a4f193b57..f433e36924 100644 --- a/test/fixedbugs/issue8438.go +++ b/test/fixedbugs/issue8438.go @@ -10,8 +10,8 @@ package main func main() { - _ = []byte{"foo"} // ERROR "cannot use" - _ = []int{"foo"} // ERROR "cannot use" - _ = []rune{"foo"} // ERROR "cannot use" + _ = []byte{"foo"} // ERROR "cannot use|incompatible type" + _ = []int{"foo"} // ERROR "cannot use|incompatible type" + _ = []rune{"foo"} // ERROR "cannot use|incompatible type" _ = []string{"foo"} // OK } diff --git a/test/fixedbugs/issue8440.go b/test/fixedbugs/issue8440.go index f9b1dea3eb..e9c5b54d51 100644 --- a/test/fixedbugs/issue8440.go +++ b/test/fixedbugs/issue8440.go @@ -7,5 +7,5 @@ package main func main() { - n.foo = 6 // ERROR "undefined: n in n.foo" + n.foo = 6 // ERROR "undefined: n in n.foo|undefined name .*n" } diff --git a/test/fixedbugs/issue8507.go b/test/fixedbugs/issue8507.go index ad6ba8ac68..392ecf4063 100644 --- a/test/fixedbugs/issue8507.go +++ b/test/fixedbugs/issue8507.go @@ -9,7 +9,7 @@ package p -type T struct{ T } // ERROR "invalid recursive type T" +type T struct{ T } // ERROR "invalid recursive type .*T" func f() { println(T{} == T{}) diff --git a/test/fixedbugs/issue9521.go b/test/fixedbugs/issue9521.go index a33f0483f3..1ad40bdfda 100644 --- a/test/fixedbugs/issue9521.go +++ b/test/fixedbugs/issue9521.go @@ -13,6 +13,6 @@ func f() (_, _ []int) { return } func g() (x []int, y float64) { return } func main() { - _ = append(f()) // ERROR "cannot use \[\]int value as type int in append" - _ = append(g()) // ERROR "cannot use float64 value as type int in append" + _ = append(f()) // ERROR "cannot use \[\]int value as type int in append|incompatible type" + _ = append(g()) // ERROR "cannot use float64 value as type int in append|incompatible type" }