Relative Content

Tag Archive for swiftpolymorphismvtablevirtual-table

How swift virtual tables are implemented in case of calling super from subclass

Suppose we have a class and it’s subclass. We know that virtual table for second class has methods from superClass with changed addresses for overridden methods, and added methods from subclass is added at the end of the table. But when we have a call from subclass to it’s superclass, how is superclass method implementation address found from virtual table when there’s no address for that method in subclass vtable as it’s overridden.