-
Notifications
You must be signed in to change notification settings - Fork 917
New issue
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
OptimizeReflectImplements(?) is causing behaviour differences #3580
Comments
Another way to make the test pass under tinygo: change the name of the interface method from |
@aykevl I need help with this one :( |
I suspect the bug here is that |
Yes, thinking a bit more about this I am pretty sure the
|
One possible fix is to modify if someType.Kind() == reflect.Interface {
implements := someType.Implements(interfaceType)
} else {
_, implements := someType.(interfaceType) // someType is the type pointer extracted from the interface
} This is doable, but kinda gnarly (easiest would probably be to pass a function pointer of the type assert to a function in the reflect package and write the above code as plain Go code). |
Also see #4376 which would probably fix the bug (since the buggy code gets removed). |
The text was updated successfully, but these errors were encountered: