[Issue 10844] New: Importing package as module fails with nested packages

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Aug 18 04:55:13 PDT 2013


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

           Summary: Importing package as module fails with nested packages
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: szadows at gmail.com


--- Comment #0 from Robik <szadows at gmail.com> 2013-08-18 04:55:11 PDT ---
This code fails:

p1/p2/p3/m1.d:

    module p1.p2.p3.m1;


p1/p2/p3/package.d

    module p1.p2.p3;

    public import p1.p2.p3.m1;


main.d:

    import p1.p2.p3;

    void main() {}


Compile command:
dmd main.d p1\p2\p3\m1.d

Error message:
main.d(1): Error: can only import from a module, not from package p1.p3
main.d(1): Error: module p3 is in file 'p1\p2\p3.d' which cannot be read

-- 
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