Are selective imports supposed to always be public?

tsbockman via Digitalmars-d-learn digitalmars-d-learn at
Sun Dec 6 02:31:58 PST 2015

Why does this code compile? Shouldn't the `isIntegral` import be 
private to module `testB` unless I explicitly ask for it to be 

// testB.d
module testB;

import std.traits : isIntegral;

// testA.d
module testA;

void main(string[] args) {
     import testB;
     static assert(isIntegral!int);

More information about the Digitalmars-d-learn mailing list