[dmd-internals] Odd lookup bug
Walter Bright
walter at digitalmars.com
Sat Nov 12 18:22:47 PST 2011
On 11/12/2011 5:55 PM, Andrei Alexandrescu wrote:
> I tracked down an odd bug in name lookup. With the latest and greatest version
> of everything, do this:
>
> cd /path/to/phobos
> dmd -w -m32 -d -c -o- -I../druntime/import -unittest std/file.d
>
> That works handsomely. Now try this:
>
> dmd -w -m32 -d -c -o- -I../druntime/import std/file.d
>
> Compilation fails with:
>
> std/file.d(1945): Error: undefined identifier package c.stdlib
>
> Fix that, and there will be others. Apparently lookup proceeds differently
> with -unittest, because I cannot see any import of std.c.stdlib guarded by
> version(unittest).
>
> Any idea of what's happening?
>
No, but std.file imports about everything else in Phobos, and there are many
imports conditioned upon unittest.
More information about the dmd-internals
mailing list