Closed mvertes closed 1 year ago
sample.go
package main import "github.com/traefik/yaegi/_test/p7" type messageState struct{} func (m *messageState) ProtoMethods() *p7.Methods { return nil } func main() { var in p7.Input ms, ok := in.Message.(*messageState) println(ms == nil, ok) } // See below for dependency packages
$ go run ./sample.go false true
$ yaegi ./sample.go sample.go:11:12: impossible type assertion: *main.messageState does not implement p6.Message
v0.14.2
To be tested with the following dependencies:
package p7
import "github.com/traefik/yaegi/_test/p6"
type Methods = struct { Name string }
type Input = struct { Message p6.Message }
* p6.go: ```go package p6 type methods = struct { Name string } type Message interface { ProtoMethods() *methods }
This issue is related to #1464. From first investigations, it probably requires that #1416 is solved too.
Fixed by #1479.
The following program
sample.go
triggers an unexpected resultExpected result
Got
Yaegi Version
v0.14.2
Additional Notes
To be tested with the following dependencies:
import "github.com/traefik/yaegi/_test/p6"
type Methods = struct { Name string }
type Input = struct { Message p6.Message }
This issue is related to #1464. From first investigations, it probably requires that #1416 is solved too.