[dmd-internals] Odd lookup bug

Rainer Schuetze r.sagitario at gmx.de
Sun Nov 13 10:08:36 PST 2011


There is a similar issue with std.regex:

import std.regex;

void main()
{
     auto re = regex("a");
}

"dmd test.d" or "dmd -debug -unittest test.d" work fine, but
"dmd -debug test.d" yields

m:\s\d\rainers\phobos\std\regex.d(2840): Error: undefined identifier 
writefln

due to "version(unittest) debug import std.stdio;" in std.regex.

Rainer

On 13.11.2011 14:30, Andrei Alexandrescu wrote:
> On 11/13/11 12:47 AM, Christian Kamm wrote:
>> It's bug http://d.puremagic.com/issues/show_bug.cgi?id=6307 .
>>
>> with -unittest:
>> std.algorithm ->  std.random ->  std.numeric ->  std.c.stdlib
>>
>> without -unittest, no one imports std.c.stdlib.
>
> Thanks, that is it. It's a bit ironic how the issue never comes up 
> during phobos builds, but instead when building 
> d-programming-language.com.
>
> I made a commit that fixes all instances.
>
>
> Andrei
> _______________________________________________
> dmd-internals mailing list
> dmd-internals at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-internals
>



More information about the dmd-internals mailing list