[Issue 3254] New: Module member visibility depends on declaration order

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Aug 16 18:53:51 PDT 2009


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

           Summary: Module member visibility depends on declaration order
           Product: D
           Version: 1.030
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: snake.scaly at gmail.com


The following code compiles:

--a.d---------
import b;
void main() {
  foo(0);
}
--------------

--b.d---------
void foo(int x) {}
private void foo(float x) {}
--------------

> dmd -c -o- a.d
>

But swap function declarations in b.d, and it breaks:

--b.d---------
private void foo(float x) {}
void foo(int x) {}
--------------

> dmd -c -o- a.d
a.d: module a b.foo is private

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