Error or a new behaviour with 2.071.0

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Tue Apr 12 04:42:08 PDT 2016


On 4/8/16 2:03 PM, ZombineDev wrote:
> On Friday, 8 April 2016 at 13:44:17 UTC, Steven Schveighoffer wrote:
>> On 4/8/16 9:31 AM, Daniel Kozak wrote:

>>> Or even worse
>>>
>>> import a : Foo;
>>> import b;
>>>
>>> Foo f1; // works OK use a.Foo
>>
>> Note, import rules here say a.Foo is now a LOCAL symbol. It's like you
>> did:
>>
>> import a;
>> alias Foo = a.Foo;
>>
>> This trumps any other imports. This is a long-standing rule that was
>> not implemented properly in previous versions. You can get the old
>> behavior back I think by doing -transition=import for dmd.
>>
>
> Even so, you shouldn't be able to make a local alias to private symbol
> from a different module.

Sure, but the overloading behavior is expected is all I was saying. If 
a.Foo was not private, then the behavior above should be expected. The 
impression I get from the OP is that he thinks it's a further error.

-Steve


More information about the Digitalmars-d mailing list