private selective import not so private ?
BBasile via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Sep 10 17:51:58 PDT 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.
More information about the Digitalmars-d-learn
mailing list