digitalmars.D - Cross module conflict bug with private and public members?
- Gary Willoughby (23/23) Aug 22 2015 import std.stdio;
- H. S. Teoh via Digitalmars-d (6/13) Aug 22 2015 https://issues.dlang.org/show_bug.cgi?id=1238
- Gary Willoughby (3/15) Aug 22 2015 Ah yes, I remember this one now. When is this ever going to get
- H. S. Teoh via Digitalmars-d (7/24) Aug 22 2015 Who knows. There was an original fix by Kenji that worked, but was
- Adam D. Ruppe (7/9) Aug 22 2015 You would think so, but this is the way it has been since the
import std.stdio; import std.range; import std.concurrency; void main(string[] args) { auto generator = new Generator!(int)({ foreach (value; 1..10) { yield(value); } }); foreach (value; generator) { writeln(value); } } Compiled with `rdmd test.d` test.d(41): Error: std.concurrency.Generator(T) at /usr/include/dmd/phobos/std/concurrency.d(1569) conflicts with std.range.Generator(Fun...) at /usr/include/dmd/phobos/std/rang e/package.d(2806) `std.concurrency.Generator` is public and `std.range.Generator` is private so surely these shouldn't conflict?
Aug 22 2015
On Sat, Aug 22, 2015 at 01:47:30PM +0000, Gary Willoughby via Digitalmars-d wrote: [...]test.d(41): Error: std.concurrency.Generator(T) at /usr/include/dmd/phobos/std/concurrency.d(1569) conflicts with std.range.Generator(Fun...) at /usr/include/dmd/phobos/std/rang e/package.d(2806) `std.concurrency.Generator` is public and `std.range.Generator` is private so surely these shouldn't conflict?https://issues.dlang.org/show_bug.cgi?id=1238 T -- Nothing in the world is more distasteful to a man than to take the path that leads to himself. -- Herman Hesse
Aug 22 2015
On Saturday, 22 August 2015 at 14:28:23 UTC, H. S. Teoh wrote:On Sat, Aug 22, 2015 at 01:47:30PM +0000, Gary Willoughby via Digitalmars-d wrote: [...]Ah yes, I remember this one now. When is this ever going to get fixed?test.d(41): Error: std.concurrency.Generator(T) at /usr/include/dmd/phobos/std/concurrency.d(1569) conflicts with std.range.Generator(Fun...) at /usr/include/dmd/phobos/std/rang e/package.d(2806) `std.concurrency.Generator` is public and `std.range.Generator` is private so surely these shouldn't conflict?https://issues.dlang.org/show_bug.cgi?id=1238 T
Aug 22 2015
On Sat, Aug 22, 2015 at 03:24:45PM +0000, Gary Willoughby via Digitalmars-d wrote:On Saturday, 22 August 2015 at 14:28:23 UTC, H. S. Teoh wrote:Who knows. There was an original fix by Kenji that worked, but was reverted for various reasons. Maybe if you clamor loud enough, the PTB may finally decide to do something about it. T -- People tell me that I'm skeptical, but I don't believe them.On Sat, Aug 22, 2015 at 01:47:30PM +0000, Gary Willoughby via Digitalmars-d wrote: [...]Ah yes, I remember this one now. When is this ever going to get fixed?test.d(41): Error: std.concurrency.Generator(T) at /usr/include/dmd/phobos/std/concurrency.d(1569) conflicts with std.range.Generator(Fun...) at /usr/include/dmd/phobos/std/rang e/package.d(2806) `std.concurrency.Generator` is public and `std.range.Generator` is private so surely these shouldn't conflict?https://issues.dlang.org/show_bug.cgi?id=1238 T
Aug 22 2015
On Saturday, 22 August 2015 at 13:47:31 UTC, Gary Willoughby wrote:`std.concurrency.Generator` is public and `std.range.Generator` is private so surely these shouldn't conflict?You would think so, but this is the way it has been since the beginning of D so I wouldn't expect the implementation to change any time soon. Just work around it with static+renamed imports or full name disambiguation. https://issues.dlang.org/show_bug.cgi?id=1238
Aug 22 2015