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

     1  package main
     2  
     3  import (
     4  	"fmt"
     5  )
     6  
     7  type ResponseWriter interface {
     8  	FooBar()
     9  }
    10  
    11  type Fromage struct {
    12  	ResponseWriter
    13  }
    14  
    15  func main() {
    16  	a := Fromage{}
    17  	if a.ResponseWriter == nil {
    18  		fmt.Println("nil")
    19  	} else {
    20  		fmt.Println("not nil")
    21  	}
    22  }
    23  
    24  // Output:
    25  // nil