Is there a way to have something like this work?
Some module declares a protocol:
public protocol SomeModuleProtocol {
static func test() -> String
}
final class SomeModuleClass: SomeModuleProtocol {}
Then in the main project, have some extension to give the default implementation:
import SomeModule
extension SomeModuleProtocol {
static func test() -> String {
return "whatever"
}
}
So you can use it in your module like this:
let test = SomeModuleClass.test() // "whatever"
Right now I can’t make it work though I don’t understand why.