Having a covariance problem with a generic interface

Here is my inheritance that I’m dealing with:

interface IInputable<T> {}
interface IOutputable<U> {}
interface IStepIO<T, U> : IInputable<T>, IOutputable<U> {}
class Step<T, U> : IStepIO<T, U> {}
class Sequence<T, U> : Step<T, U> {}
class RuleSequence: Sequence<Graph, Graph> {}

If I create a new RuleSequence, I’m expecting to be able to pass it back in a method that returns IStepIO<Graph, Graph>, but I get a compiler warning that I cannot implicitly do that conversion. Something about my understanding of this situation is off because I was thinking that should work and I can’t wrap my head around why it doesn’t. Please note that I can’t make the generic types co or contra variant because I have a getter setter in both IInputable and IOutputable which uses the generic type. If someone can explain this to me like I’m 5, it would be very much appreciated. Thank you!

T and U are completely separate types all throughout the interface heirarchy.

Understand that the compiler works with generic types and doesn’t necessarily understand that your one concrete definition happens to be the same type. It sees two different types, and reports that it doesn’t know how to generically convert between them, even though you happen to be creating a class where those are the same.

Considerclass HowToConvertThis: Sequence<string, Vector3> { ... }

EDIT: I’m a dummy, I solved this. I thought I was using the same Graph type in the function signature and the interface specification, but there were different types, hence the compiler rightfully saying it couldn’t convert between the types. >___<