1// errorcheck 2 3// Copyright 2017 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// Make sure redeclaration errors report correct position. 8 9package p 10 11// 1 12var f byte 13 14var f interface{} // ERROR "issue20415.go:12: previous declaration|redefinition|f redeclared" 15 16func _(f int) { 17} 18 19// 2 20var g byte 21 22func _(g int) { 23} 24 25var g interface{} // ERROR "issue20415.go:20: previous declaration|redefinition|g redeclared" 26 27// 3 28func _(h int) { 29} 30 31var h byte 32 33var h interface{} // ERROR "issue20415.go:31: previous declaration|redefinition|h redeclared" 34