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

     1  package main
     2  
     3  func main() {
     4  	var foo int
     5  	foo = 2
     6  
     7  	type foo struct{}
     8  	var bar foo
     9  	println(bar)
    10  }
    11  
    12  // Error:
    13  // files/redeclaration3.gno:7:7: foo redeclared in this block
    14  // 	previous declaration at files/redeclaration3.gno:4:6