[dmd-beta] D2 2.058 beta
Martin Nowak
dawg at dawgfoto.de
Thu Feb 9 12:30:13 PST 2012
On Thu, 09 Feb 2012 20:37:36 +0100, Sönke Ludwig
<ludwig at informatik.uni-luebeck.de> wrote:
> Am 09.02.2012 17:27, schrieb Walter Bright:
>>
>>
>> On 2/9/2012 1:48 AM, Sönke Ludwig wrote:
>>>
>>> Another thing is that while private selective imports are not public
>>> anymore, private renamed imports now conflict in other modules in
>>> this scenario:
>>> ---
>>> module a;
>>> import std = b;
>>> module b;
>>> import a;
>>> void f(){ std.stdio.writefln("X"); } // Error: std at conflicts with
>>> std at a.d(2)
>>> ---
>>
>> I think it should conflict - can't have std as both an alias and a
>> package.
> Sorry, the example was incomplete and maybe a bit misleading:
> ---
> module a;
> private import std = b;
> ---
> ---
> module b;
> private import std.stdio;
> void f(){ std.stdio.writefln("X"); } // conflict
> ---
Private in it's current form doesn't controls access not visibility.
But then module b introduces "std" into it's own scope. If we'd follow the
usual
rule of symbol lookup, then there shouldn't be any conflict.
More information about the dmd-beta
mailing list