[Issue 11754] Disallow changing the default parameters of overridden inherited functions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Dec 19 08:50:55 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=11754


Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich at gmail.com


--- Comment #1 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-12-19 08:50:51 PST ---
What if the initializer in the base class is private?

-----
module a;
private int priv;

class A
{
    void foo(int x = priv) { }
}
-----

-----
module b;
import a;

class B : A
{
    override void foo(int x = priv)  // error: "priv" is private
    {
    }
}
-----

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


More information about the Digitalmars-d-bugs mailing list