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
Cannot convert struct to interface if it has an embedded struct with a method #139
Comments
The exact version where this becomes a problem is c545040. |
Thanks for spotting this, and more thanks for the bisection! Commit c545040 is a bugfix, which replaces a complicated (and broken) workaround with a clean implementation. I will investigate it. |
Bug confirmed. |
…lid memory address or nil pointer dereference'
Commit 4d60a7f detects this bug, and replaces the generic panic message
with the more detailed
It's not a solution, but at least I've narrowed it down to a method type being (unexpectedly) nil. |
I upgraded a project from 23a0d19 to 3d21d22 and am now having troubles converting a struct to an interface.
The exact problem stems from converting a struct with an embedded struct, wherein both structs have unique methods, to a typed interface. If only one of the structs has methods, the problem goes away.
Minimal reproducible code:
Error output:
The text was updated successfully, but these errors were encountered: