[Issue 11731] New: private enum behavior

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Dec 12 07:07:06 PST 2013


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 at puremagic.com
        ReportedBy: yuri.musashi.miwa.tamura at gmail.com


--- Comment #0 from Musashi Tamura <yuri.musashi.miwa.tamura at 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: -------


More information about the Digitalmars-d-bugs mailing list