If you have a protocol which has a default method implemented in an extension, the generated code will fail to compile because the Java compiler will complain about the extracted interface "is not abstract and does not override abstract method".
Consider the following
protocol MyProtocol {}
extension MyProtocol {
public func myDefaultMethod() {}
}
will fail with:
error: MyProtocol is not abstract and does not override abstract method myDefaultMethod() in MyProtocol
Instead we should not generate any methods, variables and initializers defined in extensions as part of the extracted interface. But we could generate them as default methods instead. This means we need to change the analysis phase to know what decls are defined in an extension and which come from the protocol requirements themselves.
If you have a protocol which has a default method implemented in an extension, the generated code will fail to compile because the Java compiler will complain about the extracted
interface"is not abstract and does not override abstract method".Consider the following
will fail with:
Instead we should not generate any methods, variables and initializers defined in extensions as part of the extracted
interface. But we could generate them asdefaultmethods instead. This means we need to change the analysis phase to know what decls are defined in an extension and which come from the protocol requirements themselves.