Possibile import problem

bearophile bearophileHUGS at lycos.com
Mon Dec 17 13:27:33 PST 2007


This is a problem I have found, it requires 3 source files, called test.d, a.d, b.d.

---------------

The a.d module:

import std.string: join;
import std.string: join;

---------------

The b.d module: 

import std.string: join;

---------------

The main module is test.d:

import a, b;
void main() {
    join(["a"], "");
}

---------------

DMD v1.024 produces this:

test.d(4): Error: a.join at a.d(1) conflicts with b.join at b.d(1)

Is this a bug? Aren't names qualified imports private too? And if not, why?

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list