// package.dAnd this used to work. Now, I added a new file:// main.d:// mylib/all.d:// mylib/util.d:Originally, I had something like this:Hello,I have some code using the old "all.d" idiom, which I am changing to use the new "package.d" feature.
module mylib.util;
class Foo { }
module mylib.all;
public import mylib.util;
import mylib.all;
void main()
{
auto f = new mylib.util.Foo;
}module mylib;
public import mylib.util;And changed the 'import' in the main one:
// main.dimport mylib;
void main()
{
auto f = new mylib.util.Foo;
}Now, the compiler complains:
main.d(5): Error: undefined identifier 'util'
main.d(5): Error: mylib.util.Foo is used as a typeIsn't this 'package.d' feature supposed to work just as the old 'all.d' and '_,d' we used before?(I see that I can use 'mylib.Foo' instead of 'mylib.util.Foo', but http://dlang.org/module.html is clear saying that "[a]ll symbols from a publicly imported module are also aliased in the importing module. This means that if module D imports module C, and module C publicly imports module B which has the symbol bar, in module D you can access the symbol via bar, B.bar, and C.bar.")I am using DMD 2.064 here.Thanks,LMB