[Issue 10996] Subtyping with "alias this" conflicts with private base type

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Sep 17 03:09:43 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10996



--- Comment #2 from Joseph Rushton Wakeling <joseph.wakeling at webdrake.net> 2013-09-17 03:09:41 PDT ---
The issue also affects module-level aliases, e.g.:

    alias fun = Impl!int;

    private template Impl(T)
    {
        void Impl(){}
    }

See: http://forum.dlang.org/thread/sqtmfbzusxzchuncfsoh@forum.dlang.org

Example benefit for this kind of aliasing: the programmer can define a private
implementation that takes a variety of template parameters, and make publicly
available only instantiations with a sane choice of parameter values (could be
useful for e.g. random number generators).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list