D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 1754 - module member visibility does not affect conflicts
Summary: module member visibility does not affect conflicts
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 Windows
: P2 normal
Assignee: Walter Bright
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2007-12-30 03:46 UTC by Vladimir Panteleev
Modified: 2016-03-05 14:16 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Vladimir Panteleev 2007-12-30 03:46:55 UTC
=== 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 David Simcha 2008-08-06 12:15:18 UTC

*** This bug has been marked as a duplicate of 1238 ***
Comment 3 github-bugzilla 2012-02-18 11:47:12 UTC
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/de3acab2c613267ba5087ab62681391968afb3ff
Revert "fixed Issue 1754"

This reverts commit fe30e8aec437a9bb42acf9bca11faf12078cd74e.
Comment 5 github-bugzilla 2012-02-18 16:22:49 UTC
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/6404649875861176dc466633bbe4ee6e4bf32758
Revert "fixed Issue 1754"

This reverts commit 57a7a439f20d303eb36ad7919fb81714c91f564e.