[Issue 11451] import statements don't work when compiling several files at once

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Nov 6 06:10:07 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=11451



--- Comment #3 from Atila Neves <atila.neves at gmail.com> 2013-11-06 06:10:00 PST ---
(In reply to comment #2)
> Ah, I see what you mean, you examples are actually incomplete (it will fail to
> compile with no import statements as expected)
> 
> Most likely you are trying to import baz.d from bazuser via `import
> foo.bar.baz` and getting this error. This is expected and by design as module
> name equals to file name by default and you are importing it via qualified
> (package) name. Adding `module foo.bar.baz;` at top for baz.d will fix it.

Yeah, sorry, I forgot to include `import foo.bar.baz` at the top of
`bazuser.d`. I know that adding `module foo.bar.baz` to `baz.d` will "fix it",
unless I decide to import it from somewhere else. Basically now the module
needs to know where it will be compiled from to declare itself properly, which
doesn't make any sense.

And besides, separate compilation works as intended, why would passing in both
file names make a difference?

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list