Class Inheritance Limitations

As for interface inheritance, a class cannot redefine an operation or data member that it inherits from a base interface or class. For example:

Slice
module M
{
    interface BaseInterface 
    {
        void op();
    }

    class BaseClass
    {
        int member;
    }

    class DerivedClass extends BaseClass implements BaseInterface
    {
        void someOperation();       // OK
        int op();                   // Error!
        int  someMember;            // OK
        long member;                // Error!
    }
}

See Also