This is not just a question.
Yonggang Luo
yonggangluo at hotmail.com
Fri Nov 14 03:18:23 PST 2008
//--------------
//start file A.d
module A;
public class Base{}
public void baseFunction{}
//end file A.d
//--------------
//-------------
//start file B.d
module B;
private import A;
public void FunctionB(Base x); //at least this is illegal. Because ...
public Base FunctionElse(); /*This is also be illegal, the same reason*/
public class B:Base{}; /*I think this is illegal should be better*/
/* This means we can't access a private module through any way.*/
//end file B.d
//-------------
//-------------
//start file C.d this fele is the reason...
module C;
private import B;
private void FunctionC()
{
Base x; //illegal
//so you can't access FunctionB(x); /*Because x can't be define*/
}
//end file C.d
More information about the Digitalmars-d
mailing list