github.com/gmemcc/yaegi@v0.12.1-0.20221128122509-aa99124c5d16/_test/issue-1311.go (about)

     1  package main
     2  
     3  type T struct {
     4  	v interface{}
     5  }
     6  
     7  func f() (ret int64, err error) {
     8  	ret += 2
     9  	return
    10  }
    11  
    12  func main() {
    13  	t := &T{}
    14  	t.v, _ = f()
    15  	println(t.v.(int64))
    16  }
    17  
    18  // Output:
    19  // 2