www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11731] New: private enum behavior

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

           Summary: private enum behavior
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: yuri.musashi.miwa.tamura gmail.com



2013-12-12 07:07:04 PST ---
// module1.d
private enum X = 1;

// main1.d
import module1;
void main() {
    int i = X;
}

// module2.d
private enum { X = 1 }

// main2.d
import module2;
void main() {
    int i = X;
}

 dmd main1
main1.d(4): Error: module main1 module1.X is private
 dmd main2
(no error) Is it a correct behavior? -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 12 2013