On Friday, 8 April 2016 at 13:44:17 UTC, Steven Schveighoffer wrote:
On 4/8/16 9:31 AM, Daniel Kozak wrote:
On Friday, 8 April 2016 at 13:28:15 UTC, Daniel Kozak wrote:
[...]

Btw:

import a : Foo;

Foo f1; // works OK even if Foo is private

Someone just filed this morning:

https://issues.dlang.org/show_bug.cgi?id=15896

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.

-Steve

Even so, you shouldn't be able to make a local alias to private symbol from a different module.

Reply via email to