Swift: overriding typealias inside subclass
问题 So I was thinking about a custom pattern in my project, but I can't get it to work. The main idea is to change the typealias on every subclass to get access to the subclass specific interface. protocol InstanceInterface: class { typealias Interface var interface: Interface { get } } // Baseclass protocol FirstClassInterface: class { /* nothing here for the example */ } class FirstClass: InstanceInterface, FirstClassInterface { typealias Interface = FirstClassInterface var interface: Interface