github.com/traefik/yaegi@v0.15.1/_test/fun16.go (about) 1 package main 2 3 func f1(a int) int { return a + 1 } 4 5 func f2(a int) interface{} { 6 // TODO: re-enable the optimized case below, once we've figured out why it 7 // interferes with the empty interface model. 8 // return f1(a) 9 var foo interface{} = f1(a) 10 return foo 11 } 12 13 func main() { 14 c := f2(3) 15 println(c.(int)) 16 } 17 18 // Output: 19 // 4