Swift Inheritance: Super's Super

Viewed 2631

Supposing to have this three classes with this simply hierarchy:

class A {
    func foo() {
       print("A")
    }
}

class B: A {
    override func foo() {
       super.foo()
       print("B")
    }
}

class C: B {
    override func foo() {
       // *******
       print("C")
    }
}

In class C, in overrided method foo I want to call a method foo: is it possible?

In C++ this can be achieved with C->A::foo(), but how do I do this in Swift?

1 Answers
Related