Source file test/fixedbugs/issue20415.go

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

View as plain text