Subclassing Opaque Types
Subclassing Opaque Types
If you create a subclass of a partially revealed superclass, all of
the superclass methods are still in your interface, even if they
were hidden to you.
For example, suppose there another interface to Directory
that reveals some more of Directory.T, as illustrated
below. Given that interface, a malicious user could do the following:
IMPORT Directory, DirectoryFriend, FileSystemDirectory;
NARROW(NEW(FileSystemDirectory.T), Directory.T).oops();
Last changed July 17, 1996
whsieh@cs.washington.edu