Closed Ralph7C2 closed 6 months ago
Thanks for this! I will take a detailed look in the next day, but at first glance it looks great 🙏
Hey @joefitzgerald I'd like to resurrect this if I could, I just bumped into this problem again. https://goplay.tools/snippet/cRLlU7yek6Q is a summary
The problem could also be fixed if concrete types fulfilled interfaces with interfaces int heir methods (a mouthful, I know). But, that seems less likely and I think this patch would fix the issue for me(allowing to generate a fake for the specified generic in an interface)
Hey @Ralph7C2 sorry for the delay. Looking at this now.
Hey @joefitzgerald (hope you are doing well, long time no speak since our pivotal days). I hate to be that person but I also need this as well 👯
Hope you have some time to merge this, we using a work around for now!
@Ralph7C2, sorry for the lengthy delay in getting this merged (work got a little crazy). Thanks for the contribution!
Hi @zachgersh! It's great to hear from you!! You can always feel free to be that person 😄 ❤️.
This only covers the case where the interface itself isn't generic but accepts or returns a generic with a concrete type arg.
Currently, the fake fails to import the package for the type arg. Now, while creating imports, we iterate over TypeArgs for named types and import the packages for them.