[Issue 8856] import inside function sometimes causes link errors

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Oct 19 20:36:39 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8856



--- Comment #4 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2012-10-19 20:34:14 PDT ---
(In reply to comment #2)
> snip

The problem is DMD's -v option doesn't output dependencies when an import is
function local.

test.d:
module test;
import foo;
void main() { }

foo.d:
module foo;
import bar;

bar.d is empty

$ dmd -c -v test.d
> import    foo   (foo.d)
> import    bar   (bar.d)

Now use a local import in foo.d:

foo.d:
module foo;
void loc() { import bar; }

$ dmd -c -v test.d
> import    foo   (foo.d)

DMD doesn't output the import to bar.d when using -v. That has to be fixed.

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


More information about the Digitalmars-d-bugs mailing list