How to call extension function of the base class in a derived class using the super keyword?
I tried to call using super but it doesn\'t work.
open
This type of namespace conflict is a general drawback of extension methods. Extension methods are essentially static and do not mix well with inheritance.
In your particular case, there doesn't seem to be a need for the function sum
to be an extension method. If you change it to an open
virtual method, you will be able to design better for inheritance and potential overriding in a subclass.