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

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