Thread overview
private selective import not so private ?
Sep 11, 2015
BBasile
Sep 11, 2015
Adam D. Ruppe
Sep 11, 2015
BBasile
Sep 11, 2015
Gary Willoughby
September 11, 2015
While trying to get why some call to memmove without the right import didn't lead to a compilation failure i've found that imported symbols are not private ! Is that a bug ? The specs don't say that a selective import is public !

-- other.d --
module other;
private import core.stdc.string: memmove;
-------------

-- main.d --
module main;
import other;
void main()
{
    void* a,b;
    memmove(a,b,0);
}
------------

command `dmd main.d other.d: ok compiles without error.
win32, tested with latest beta, and 2 previous versions.
September 11, 2015
On Friday, 11 September 2015 at 00:52:00 UTC, BBasile wrote:
> While trying to get why some call to memmove without the right import didn't lead to a compilation failure i've found that imported symbols are not private ! Is that a bug ? The specs don't say that a selective import is public !

Yes, it is one of the oldest, most infamous bugs D has, the dreaded #314:

https://issues.dlang.org/show_bug.cgi?id=314
September 11, 2015
On Friday, 11 September 2015 at 00:55:41 UTC, Adam D. Ruppe wrote:
> On Friday, 11 September 2015 at 00:52:00 UTC, BBasile wrote:
>> While trying to get why some call to memmove without the right import didn't lead to a compilation failure i've found that imported symbols are not private ! Is that a bug ? The specs don't say that a selective import is public !
>
> Yes, it is one of the oldest, most infamous bugs D has, the dreaded #314:
>
> https://issues.dlang.org/show_bug.cgi?id=314

Damn, you break my joy...
September 11, 2015
On Friday, 11 September 2015 at 00:55:41 UTC, Adam D. Ruppe wrote:
> On Friday, 11 September 2015 at 00:52:00 UTC, BBasile wrote:
>> While trying to get why some call to memmove without the right import didn't lead to a compilation failure i've found that imported symbols are not private ! Is that a bug ? The specs don't say that a selective import is public !
>
> Yes, it is one of the oldest, most infamous bugs D has, the dreaded #314:
>
> https://issues.dlang.org/show_bug.cgi?id=314

Walter, Andrei, when is this ever going to be addressed? It catches out so many people, me included and is raised on this newsgroup over and over again.