Slide 11
Slide 11 text
Swift Invariance
protocol Saiyan{}
protocol SuperSaiyan: Saiyan{}
class ZFighter {}
let goku: ZFighter = ZFighter()
let gokuSuperSaiyan: ZFighter = goku ❌
// cannot convert value of type 'ZFighter' to specified type
'ZFighter'
Any custom defined type in Swift is Invariance
Custom type