Avatar
omochimetaru 11/2/2018 6:42 AM
@swift-4.2.4 class Animal { func bark() { } } protocol HogeP where Self : Animal {} protocol FugaP : HogeP {} extension FugaP { func fuga() { self.bark() } } func foo(_ fuga: FugaP) { fuga.fuga() } class Cat : Animal, FugaP { } let cat = Cat() foo(cat)