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

     1  package main
     2  
     3  import "fmt"
     4  
     5  var a = []int{1, 2, 3}
     6  
     7  func f() { fmt.Println(a) }
     8  
     9  func main() {
    10  	fmt.Println(a)
    11  	a = []int{6, 7}
    12  	f()
    13  }
    14  
    15  // Output:
    16  // [1 2 3]
    17  // [6 7]