F<A> A: B then F<A> : F<B> A: B but no relation between F<A> and F<B> No relation between A and B but F<A> : F<B> If A is a subtype of B, then F<A> is a subtype of F<B>
F<A> A: B then F<A> : F<B> A: B but no relation between F<A> and F<B> No relation between A and B but F<A> : F<B> If A is a subtype of B, then F<B> is a subtype of F<A>
let goku: ZFighter<Saiyan> = ZFighter() let gokuSuperSaiyan: ZFighter<SuperSaiyan> = goku ❌ // cannot convert value of type 'ZFighter<Saiyan>' to specified type 'ZFighter<SuperSaiyan>' Any custom defined type in Swift is Invariance Custom type