The following program sample.go triggers an unexpected result
package main
import (
"fmt"
"github.com/traefik/yaegi/_test/p2"
)
func main() {
var v *p2.T
var i interface{}
i = v
if _, ok := i.(p2.I); ok {
fmt.Printf("ok\n")
} else {
fmt.Printf("not ok\n")
}
}
Expected result
Got
$ yaegi run ./sample.go
not ok
Yaegi Version
14acf61
Additional Notes
github.com/traefik/yaegi/_test/p2/p2.go is
package p2
type I interface {
isI()
}
type T struct{}
func (t *T) isI() {}
This is similar to #1025.
The following program
sample.gotriggers an unexpected resultExpected result
Got
Yaegi Version
14acf61
Additional Notes
github.com/traefik/yaegi/_test/p2/p2.go is
This is similar to #1025.