[Issue 17298] Templates cause wrong deprecation warnings about derived class accessing private method

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Apr 5 04:32:39 PDT 2017


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

ag0aep6g at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ag0aep6g at gmail.com

--- Comment #1 from ag0aep6g at gmail.com ---
The test case doesn't need templates.

a.d:
----
import b: Derived;

class Base
{
    private void func() {}
}

void foo() { new Derived().func(); }
----

b.d:
----
import a: Base;
class Derived : Base {}
----

`dmd -c a b`:
----
a.d(8): Deprecation: a.Base.func is not visible from class Derived
----

--


More information about the Digitalmars-d-bugs mailing list