public import and bugs it causes

Alex Makhotin alex at
Fri May 14 11:47:42 PDT 2010

Anders F Björklund wrote:
> Alex Makhotin wrote:
>> Today I found a strange bug in my code which was caused by 'public 
>> import' declaration from the wxD library.
>> The library imports publicly the 'std.compiler' module from Phobos.
>> And it has the 'const string name;' declaration.
> I removed the 'std.compiler' import and replaced it with __VERSION__...
> Hopefully that should work around the issue. Wonder what else it breaks.
> --anders

Hi, Anders.

Thank you for help.
The issue was that the code in my program passed the variable 'name' to 
the method as a parameter instead of the variable 'value'. Where the 
variable 'name' doesn't present in any of my classes. I just replaced it 
with the right one and it worked. It was not so much of a pleasure to 
find out that I mistyped the argument of the member function and it 
*matched* with the external declaration of public import hierarchy.
Therefore I would like to get support from the compiler on the issue not
to repeat this bug any more.

By the way, I modified the wxD(including the fix for this bug) and added 
new functionality for my needs. I'm going to use this wrapper as a base 
for the BDE GUI library and will make this available(including the 
source) in version 2 with the GUI editor in the box.

Alex Makhotin,
the founder of BITPROX,

More information about the Digitalmars-d mailing list