// file c/b.d module c.b; public void aPublicFunction() {} package void aPackageFunction() {} // file a.d module a; public import c.b; // file main.d import a; void main() { aPublicFunction(); aPrivateFunction(); } dmd main.d a.d c/b.d main.d(7): Deprecation: c.b.aPackageFunction is not visible from module main main.d(7): Error: function c.b.aPackageFunction is not accessible from module main The compiler emits 2 messages instead of just 1.
The example in the previous comment was supposed to be: // file c/b.d module c.b; public void aPublicFunction() {} package void aPackageFunction() {} // file a.d module a; public import c.b; // file main.d import a; void main() { aPublicFunction(); aPackageFunction(); // Typo: Private instead of Package } Anyway, this works fine if compiling with `-transition=import`. I don't know
`-transtion=import` was implemented with the fix for issue 10378. I don't know if the compiler is transitioning to the behavior of the current compiler implementation, or transitioning away from the current implementation to the behavior in `-transition=import`.
This should be resolved whenever the visibility and lookup deprecations are removed. https://github.com/dlang/dmd/pull/9058 https://github.com/dlang/dmd/pull/7241
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19515 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB