Avatar
Swiftのprotocolのfuncデフォルト実装で、変数をプロトコル型として使用したときに、デフォルト実装に引っ張られてしまうのって防げないでしょうか? protocol SomeProtocol { } extension SomeProtocol { func somePrint() { print("First") } } struct SomeModel: SomeProtocol { func somePrint() { print("Second") } } let someModel: some SomeProtocol = SomeModel() someModel.somePrint() // First