[Issue 15983] [REG 2.071] Symbol visibility in derived classes

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Sep 11 20:36:35 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=15983

Martin Nowak <code at dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #1 from Martin Nowak <code at dawg.eu> ---
You can get the base class like so.

void foo(T)(T t) if (is(T Base == super))
{
    Base.Something something;
}

Still need to have all base classes in a the same module/package as the
function.
Would be interested to know, why you rely on duck typing of the base class.
Also maybe it's not worth to hide Something when it's a common property of your
class hierarchy.

*** This issue has been marked as a duplicate of issue 15897 ***

--


More information about the Digitalmars-d-bugs mailing list