[dmd-beta] D2 2.058 beta 3

Leandro Lucarella luca at llucax.com.ar
Mon Feb 13 04:27:08 PST 2012


David Nadlinger, el 12 de febrero a las 23:08 me escribiste:
> On 2/12/12 10:58 PM, Andrej Mitrovic 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?
> 
> Personally, I certainly wouldn't expect selective imports to resolve
> conflicts, but what changed is that they were previously implemented
> using the equivalent of an explicit AliasDeclaration internally,
> which thus used to resolve the conflict.

Look similar to http://d.puremagic.com/issues/show_bug.cgi?id=7373. In
that case I asked if renamed imports were supposed to resolve conflicts
and the answer was yes (and I agree) and the bug was fixed. I think it
would be best to be consistent with selective and renamed imports and
make them resolve conflicts. After all you are asking for a specific
symbol, I can't see why an implicitly imported symbol should conflict
with that when the intention is pretty clear.

-- 
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
careful to all animals (never washing spiders down the plughole),
keep in contact with old friends (enjoy a drink now and then),
will frequently check credit at (moral) bank (hole in the wall),


More information about the dmd-beta mailing list