[Issue 9194] New: Module imports are not properly checked when found in import path

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Dec 22 05:20:21 PST 2012


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

           Summary: Module imports are not properly checked when found in
                    import path
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: andrej.mitrovich at gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2012-12-22 05:20:20 PST ---
.\main.d
.\foo.d

main.d:

module main;
import foo;
void main() { test(); }

foo.d:

module bar;
void test() { }

This is OK:

$ dmd -c main.d foo.d
> main.d(2): Error: module bar from file foo.d must be imported as module 'bar'

This should also fail to compile but it doesn't
$ dmd -c main.d
>

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