[Issue 16556] New: Named imports violate privacy

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Sep 27 14:01:59 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=16556

          Issue ID: 16556
           Summary: Named imports violate privacy
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: eyal at weka.io

Private qualifier is ignored on explicit imported names.

module a;

private int x;



module b;

import a : x; // If you remove ": x" suffix, it will not compile.

void main() {
  x += 1; // <-- compiles
}

--


More information about the Digitalmars-d-bugs mailing list