digitalmars.D.bugs - private in import still not respected - linux 0.94
- Ant (44/44) Jul 01 2004 this still compiles and runs.
this still compiles and runs.
I would expect to report
"undefined identifier std"
when compiling B.d
however if "private import std.string;"
is declared inside the body of class A
compilation fails with
"B.d(7): undefined identifier std"
which is an improvement from
previous versions!
private import std.string;
private import B;
class A
{
void a()
{
printf("A test toString for 1 = %.*s\n",std.string.toString(1));
}
}
void main()
{
A a = new A;
a.a();
B b = new B;
b.b();
}
private import A;
class B
{
void b()
{
printf("B test toString for 1 = %.*s\n",std.string.toString(1));
}
}
$ dmd A B -I~/dmd/src/phobos
gcc A.o B.o -o A -lphobos -lpthread -lm
$ A
A test toString for 1 = 1
B test toString for 1 = 1
Ant
Jul 01 2004








Ant <duitoolkit yahoo.ca>