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

     1  package main
     2  
     3  import (
     4  	"fmt"
     5  )
     6  
     7  type A struct{}
     8  
     9  func (a A) f(vals ...bool) {
    10  	for _, v := range vals {
    11  		fmt.Println(v)
    12  	}
    13  }
    14  
    15  func main() {
    16  	a := A{}
    17  	a.f(true)
    18  }
    19  
    20  // Output:
    21  // true