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

     1  package main
     2  
     3  type Kind int
     4  
     5  const (
     6  	None Kind = 0
     7  	Left Kind = 1 << iota
     8  	Right
     9  	Both Kind = Left | Right
    10  )
    11  
    12  func main() {
    13  	println(None, Left, Right, Both)
    14  }
    15  
    16  // Output:
    17  // (0 main.Kind) (2 main.Kind) (4 main.Kind) (6 main.Kind)