nested module problem

Jean-Louis Leroy via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Sep 2 13:03:48 PDT 2017


So I have:

jll at ORAC:~/dev/d/tests/modules$ tree
.
├── foo
│   └── bar.d
└── foo.d

foo.d contains:
import foo.bar;

bar.d is empty.

Now I try compiling:
jll at ORAC:~/dev/d/tests/modules$ dmd -c foo.d
jll at ORAC:~/dev/d/tests/modules$ dmd -c foo/bar.d

So far so good. Now I try it the way dub does it:
jll at ORAC:~/dev/d/tests/modules$ dmd -c foo.d foo/bar.d
foo.d(1): Error: module bar from file foo/bar.d must be imported 
with 'import bar;'

What's up?



More information about the Digitalmars-d-learn mailing list