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

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