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

     1  package main
     2  
     3  import "fmt"
     4  
     5  func foo() (res [4]int) {
     6  	res[0] |= 1
     7  	res[1] |= 2
     8  	res[2] |= 3
     9  	res[3] |= 4
    10  	return
    11  }
    12  
    13  func main() {
    14  	a := foo()
    15  	fmt.Println(a)
    16  }
    17  
    18  // Output:
    19  // [1 2 3 4]