gitlab.com/ethan.reesor/vscode-notebooks/yaegi@v0.0.0-20220417214422-5c573557938e/_test/type22.go (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