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

     1  package main
     2  
     3  const BlockSize = 8
     4  
     5  type Cipher struct{}
     6  
     7  func (c *Cipher) BlockSize() int { return BlockSize }
     8  
     9  func main() {
    10  	println(BlockSize)
    11  	s := Cipher{}
    12  	println(s.BlockSize())
    13  }
    14  
    15  // Output:
    16  // 8
    17  // 8