Bug 1754 – module member visibility does not affect conflicts
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2007-12-30T03:46:00Z
Last change time
2016-03-05T14:16:24Z
Keywords
rejects-valid
Assigned to
bugzilla
Creator
dlang-bugzilla
Comments
Comment #0 by dlang-bugzilla — 2007-12-30T03:46:55Z
=== a.d ===
module a;
import b;
import c;
void main()
{
func();
}
=== 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 std.stream.iswhite).
Comment #1 by dsimcha — 2008-08-06T12:15:18Z
*** This bug has been marked as a duplicate of 1238 ***
Comment #2 by github-bugzilla — 2012-02-18T11:04:30Z