This is not just a question.
Simen Kjaeraas
simen.kjaras at gmail.com
Tue Nov 11 20:09:18 PST 2008
module baseClass;
public class base {}
// end file
module subClass;
private import baseClass
public class sub : base {} // legal. base is imported from baseClass.
// end file
module subsubClass;
private import subClass;
public class subsub : sub {} // legal. sub is imported from subClass.
public class subsub2 : base {} // illegal. base is not imported, as it is
a private import in subClass.
// end file
All public members of a module are imported with "private import X;" in
module Y, but none are visible to modules that are in turn importing
module Y.
--
Simen
More information about the Digitalmars-d
mailing list