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

     1  package main
     2  
     3  type T1 T
     4  
     5  func foo() T1 {
     6  	return T1(T{"foo"})
     7  }
     8  
     9  type T struct {
    10  	Name string
    11  }
    12  
    13  func main() {
    14  	println(foo().Name)
    15  }
    16  
    17  // Output:
    18  // foo