github.com/traefik/yaegi@v0.15.1/_test/named3.go (about)

     1  package main
     2  
     3  import "github.com/traefik/yaegi/_test/named3"
     4  
     5  var globalT *T
     6  
     7  func init() {
     8  	globalT = &T{A: "test"}
     9  }
    10  
    11  type T named3.T
    12  
    13  func (t *T) PrintT() {
    14  	(*named3.T)(t).Print()
    15  }
    16  
    17  func main() {
    18  	globalT.PrintT()
    19  }
    20  
    21  // Output:
    22  // test