On Friday, 8 April 2016 at 13:28:15 UTC, Daniel Kozak wrote:
From https://dlang.org/spec/attribute.html#ProtectionAttribute
Protection does not participate in name lookup. In particular,
if two symbols with the same name are in scope, and that name
is used unqualified then the lookup will be ambiguous, even if
one of the symbols is inaccessible due to protection. For
example:
module A;
private class Foo {}
module B;
public class Foo {}
import A;
import B;
Foo f1; // error, could be either A.Foo or B.Foo
B.Foo f2; // ok
But Foo f1; // works ok now with 2.071.0
Btw:
import a : Foo;
Foo f1; // works OK even if Foo is private
Or even worse
import a : Foo;
import b;
Foo f1; // works OK use a.Foo