protocol P0 { init(string: String) } class Animal { init() {} convenience init(string: String) { self.init() } var str1: String = "" } final class Cat : Animal, P0 { var str2: String = "" } func createP0<X: P0>() -> X { return X.init(string: "apple") } let cat: Cat = createP0() print(cat)
↑特に問題なし