This came from the 2.071 change of the import rules. I don't know whether a dmd or phobos issue. And it is a deprecation massage, so we can suppress. It also relates to Issue 15826. CODE: import std.typecons; void main(string[] args) { auto a = new BlackHole!A; a.method(); } interface A { abstract void method(); import std.stdio; // default is private private alias a = int; private void ft(R)(R range) { } // non-template is visible } OUTPUT: phobos\std\traits.d(3677): Deprecation: test.A.std is not visible from module traits phobos\std\traits.d(3677): Deprecation: test.A.a is not visible from module traits phobos\std\traits.d(3677): Deprecation: test.A.ft(R)(R range) is not visible from module traits
Both, the old and the new lookup don't really allow access to private members, even when using __traits. The new visibility rules will trigger earlier, that's why you see the warning. We have to modify the lookup for traits so that it ignores symbol visibility.
Related to issue 15907.
*** Issue 15826 has been marked as a duplicate of this issue. ***
*** This issue has been marked as a duplicate of issue 15907 ***