test/fixedbugs/issue35291.go
raw| 1 | // errorcheck |
| 2 | |
| 3 | // Copyright 2019 The Go Authors. All rights reserved. |
| 4 | // Use of this source code is governed by a BSD-style |
| 5 | // license that can be found in the LICENSE file. |
| 6 | |
| 7 | // Check error message for duplicated index in slice literal |
| 8 | |
| 9 | package p |
| 10 | |
| 11 | var s = []string{ |
| 12 | 1: "dup", |
| 13 | 1: "dup", // ERROR "duplicate index in slice literal: 1|duplicate value for index 1|duplicate index 1" |
| 14 | } |