[frustration, sorry] Import conflict madness.

Chris Miller chris at dprogramming.com
Sat Jun 17 11:15:11 PDT 2006


Here's a simple example of the issue:


// -- foo.d --
private import std.stdio;


// -- bar.d --
private import std.stdio;


// -- test.d --

import foo, bar;

void main()
{
     char[] hi = std.string.toString(3);
}


DMD 0.160:
    foo.d(1): import foo.std conflicts with bar.std at bar.d(1)


Of course, the code in test.d is a mistake, but look how unhelpful the  
error message is. It will blame a library's code for a mistake the  
library-user made.

Also notice that it's considering *private* imports, which shouldn't even  
be available to test.d.



More information about the Digitalmars-d mailing list