We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sample.go
package main type Mover interface { Move() error } type car struct { Mover } type engine struct { } func (e *engine) Move() error { println("engine moved") return nil } func newMover() Mover { return car{ Mover: &engine{}, } } func main() { mover := newMover() if _, ok := mover.(car); ok { println("mover is a car") } _ = mover.Move() }
mover is a car engine moved
run: ./sample.go:27:14: impossible type assertion: main.car does not implement main.Mover (missing Move method)
v0.16.1
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The following program
sample.go
triggers an unexpected resultExpected result
Got
run: ./sample.go:27:14: impossible type assertion: main.car does not implement main.Mover (missing Move method)
Yaegi Version
v0.16.1
Additional Notes
No response
The text was updated successfully, but these errors were encountered: