www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1754] New: module member visibility does not affect conflicts

reply d-bugmail puremagic.com writes:

           Summary: module member visibility does not affect conflicts
           Product: D
           Version: 1.024
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: thecybershadow gmail.com

=== a.d ===
module a;

import b;
import c;

void main()
=== b.d ===
module b;

private void func()
=== c.d ===
module c;

void func()
=== compiler output ===
a.d(8): Error: b.func at b.d(3) conflicts with c.func at c.d(3)
a.d: module a b.func is private
a.d(8): Error: function b.func is not accessible from a

Changing the import order removes the last two errors.

Particularly annoying in some cases with Phobos (e.g. std.string.iswhite and

Dec 30 2007
parent d-bugmail puremagic.com writes:

dsimcha yahoo.com changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE

------- Comment #1 from dsimcha yahoo.com  2008-08-06 12:15 -------

*** This bug has been marked as a duplicate of 1238 ***

Aug 06 2008