diff options
Diffstat (limited to 'test/fixedbugs/issue13365.go')
-rw-r--r-- | test/fixedbugs/issue13365.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/fixedbugs/issue13365.go b/test/fixedbugs/issue13365.go index 4bd103e38d..31a663eb1f 100644 --- a/test/fixedbugs/issue13365.go +++ b/test/fixedbugs/issue13365.go @@ -11,15 +11,15 @@ package main var t struct{} func main() { - _ = []int{-1: 0} // ERROR "index must be non\-negative integer constant" - _ = [10]int{-1: 0} // ERROR "index must be non\-negative integer constant" - _ = [...]int{-1: 0} // ERROR "index must be non\-negative integer constant" + _ = []int{-1: 0} // ERROR "index must be non\-negative integer constant|index expression is negative" + _ = [10]int{-1: 0} // ERROR "index must be non\-negative integer constant|index expression is negative" + _ = [...]int{-1: 0} // ERROR "index must be non\-negative integer constant|index expression is negative" _ = []int{100: 0} - _ = [10]int{100: 0} // ERROR "array index 100 out of bounds" + _ = [10]int{100: 0} // ERROR "array index 100 out of bounds|out of range" _ = [...]int{100: 0} - _ = []int{t} // ERROR "cannot use .* as type int in slice literal" - _ = [10]int{t} // ERROR "cannot use .* as type int in array literal" - _ = [...]int{t} // ERROR "cannot use .* as type int in array literal" + _ = []int{t} // ERROR "cannot use .* as type int in slice literal|incompatible type" + _ = [10]int{t} // ERROR "cannot use .* as type int in array literal|incompatible type" + _ = [...]int{t} // ERROR "cannot use .* as type int in array literal|incompatible type" } |