[Issue 1754] New: module member visibility does not affect conflicts
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Dec 30 01:46:56 PST 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1754
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 at digitalmars.com
ReportedBy: thecybershadow at gmail.com
=== 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).
--
More information about the Digitalmars-d-bugs
mailing list