Avatar
@swift-4.2.4 @swift-5.0.3 class Parent { var id: Int init(id: Int) { self.id = id } } protocol Abstract: Parent { func printID() } class Child: Parent, Abstract { override init(id: Int) { super.init(id: id) } func printID() { print("Child: \(id)") } } let c = Child(id: 0) c.printID()