[dmd-beta] D2 2.058 beta 3

Martin Nowak dawg at dawgfoto.de
Sun Feb 12 16:14:12 PST 2012


On Sun, 12 Feb 2012 22:58:26 +0100, Andrej Mitrovic  
<andrej.mitrovich at gmail.com> wrote:

> Why does this not work anymore?
>
> module test;
>
> import std.algorithm;
> import std.utf : count;
>
> void main()
> {
>     "a".count();
> }
>
> test.d(8): Error: std.utf.count!(char).count at
> D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\utf.d(1757) conflicts
> with std.algorithm.count!("true",string).count at
> D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\algorithm.d(4551)
>
> Selective imports used to make these conflicts go away. What changed?
> _______________________________________________
> dmd-beta mailing list
> dmd-beta at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-beta

Your bug is part of a series of regressions introduced with the new
Import lookup (see my post in "[dmd-beta] D2 2.058 beta").
Selective imports are bound into the current namespace.
This means they are resolved before import lookup kicks in and
it also means that they overload against your modules symbols (if  
overloadable).


More information about the dmd-beta mailing list