github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/gnovm/tests/files/redeclaration9.gno (about)

     1  package main
     2  
     3  type a struct{}
     4  
     5  func (_ a) method() int { return 1 }
     6  
     7  func (_ a) method() int { return 2 }
     8  
     9  func main() {
    10  	println("hello")
    11  }
    12  
    13  // Error:
    14  // main/files/redeclaration9.gno:7: redeclaration of method a.method