Hi all,
So there is a simple example that works as I expect:
protocol AProtocol {
func a()
func start()
}
extension AProtocol {
func a() {
print("A")
}
func start() {
a()
}
}
class A: AProtocol {
func a() {
print("A")
}
}
class B: A {
override func a() {
print("B")
}
}
B().start()
... prints B
Now I want class A to use default implementation of 'a' method:
protocol AProtocol {
func a()
func start()
}
extension AProtocol {
func a() {
print("A")
}
func start() {
a()
}
}
class A: AProtocol {
}
class B: A {
func a() {
print("B")
}
}
B().start()
...prints A
What should I do to use method from B instead?