D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 11173 - `public` alias to an instantiation of `private` template doesn't work
Summary: `public` alias to an instantiation of `private` template doesn't work
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 enhancement
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-05 02:36 UTC by Denis Shelomovskii
Modified: 2021-03-01 00:41 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Denis Shelomovskii 2013-10-05 02:36:15 UTC
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 2 Andrej Mitrovic 2013-10-05 05:10:42 UTC
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 Mathias LANG 2021-03-01 00:41:04 UTC
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.