:- uninherit +Class +Op +Name/+Arity, … .
This prevents the class within whose scope this directive appears from inheriting the Name/Arity method of type Op from ancestor Class.
If Class is unbound, then the specified message is uninherited from all ancestors that define it.
Note that if you define a message for your class, then you do not need to uninherit that message from its superclasses: it will automatically be shadowed.
Be careful of the precedences of the message operator and the
operator. You may need to use parentheses.
:- uninherit someclass << (foo/1), someclass >> (foo/1).
This prevents the get and put methods for the slot
foo from being
inherited from any ancestors of class
someclass. In effect, it makes the
foo slot a
protected slot for this class.