On Wednesday, 17 July 2013 at 11:45:09 UTC, monarch_dodra wrote:
//main.d
import a;
void main()
{
foo(); //OK
bar(); //OK
a.foo(); //OK (!!!)
a.bar(); //OK (!!!)
a.b.foo(); //OK
a.c.bar(); //OK
}
//===============================
To be frank, I don't know if this is a bug, or a feature...
Public import adds the symbols to the module and makes them
public, by default they are private.
foo();
a.foo();
These are equivalent since a contains the symbols of b. This is
has the annoyance:
import a, b;
foo() // Ambiguous a.foo and b.foo()