Bug 11173 – `public` alias to an instantiation of `private` template doesn't work

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-10-05T02:36:15Z
Last change time
2021-03-01T00:41:04Z
Assigned to
No Owner
Creator
Denis Shelomovskii
See also
https://issues.dlang.org/show_bug.cgi?id=4533

Comments

Comment #0 by verylonglogin.reg — 2013-10-05T02:36:15Z
b.d: --- private void f(T)() { } alias fi = f!int; --- main.d: --- import b; void main() { fi(); } // Error: function b.f!int.f is not accessible from module main ---
Comment #1 by github-bugzilla — 2013-10-05T02:49:52Z
Comment #2 by andrej.mitrovich — 2013-10-05T05:10:42Z
If it's not defined in the spec it's an enhancement. See also http://d.puremagic.com/issues/show_bug.cgi?id=4533 which asks for the opposite and the newsgroup discussion it links to.
Comment #3 by pro.mathias.lang — 2021-03-01T00:41:04Z
It was made to work for a while, then it was broken again (https://issues.dlang.org/show_bug.cgi?id=21670). But since it's just a deprecation, closing as fixed.