Should the argument to bar be a Foo<String> not an IFoo<String>?
Matthew Maycock

I assume you’re talking about the second snippet with bar, the one after IFoo has been introduced. In which case, what I have is correct. bar is just using the methods of foos, so it can actually accept anything that implements those methods, namely anything implementing IFoo<String>. Hope that clarifies things!

Like what you read? Give Ross Tate a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.