cat > bug.d << CODE import bug2; private void foo() {} void main() { bar!foo(); } CODE cat > bug2.d << CODE void bar(alias foo)() { foo(); } CODE ---- dmd -c bug.d ---- bug2.d(1): Error: function bug.foo is not accessible from module bug2 bug.d(4): Error: template instance bug2.bar!(foo) error instantiating ---- The access check should be performed on the template instance argument, but not when using the aliased symbol in the template declaration module. So template alias parameters should behave like public aliases to private symbols.
*** Issue 13744 has been marked as a duplicate of this issue. ***
Works on DMD 2.090