October 18, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2417





------- Comment #10 from aarti@interia.pl  2008-10-18 16:21 -------
(In reply to comment #9)

Indeed, it works... I would swear that it doesn't, because I remember some problems with access in inheritance hierarchy... But maybe it was original case which was given here, I don't remember right now...


-- 

November 24, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2417


smjg@iname.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |smjg@iname.com
           Keywords|                            |accepts-invalid
            Summary|protected base member is not|protected base member is not
                   |available via base hanlde in|available via base handle in
                   |a derived class if it is    |a derived class if it is
                   |defined in a separate module|defined in a separate module
            Version|2.019                       |1.036




------- Comment #11 from smjg@iname.com  2008-11-24 10:47 -------
http://www.digitalmars.com/d/1.0/attribute.html
http://www.digitalmars.com/d/2.0/attribute.html
"If accessing a protected instance member through a derived class member
function, that member can only be accessed for the object instance which is the
'this' object for the member function call."

So the bug is that m2.foo() passes, rather than that m1.foo() fails.


-- 

November 24, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2417


schveiguy@yahoo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schveiguy@yahoo.com
           Keywords|                            |spec




------- Comment #12 from schveiguy@yahoo.com  2008-11-24 10:58 -------
In that case, I think the spec should be changed to reflect the current behavior.  I think Walter wanted it to model after the way C++ works, and it just wasn't explained well enough.

Without the current behavior (i.e. allowing m2.foo to be callable), functions like clone would be difficult to implement.

I think the spec should be changed to say:
"If accessing a protected instance member through a derived class member
function, that member can only be accessed for an object instance which can be
implicitly cast to the same type as 'this'."


-- 

January 23, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=2417



--- Comment #13 from github-bugzilla@puremagic.com 2012-01-22 16:46:02 PST ---
Commit pushed to https://github.com/D-Programming-Language/d-programming-language.org

https://github.com/D-Programming-Language/d-programming-language.org/commit/b26085f8a8402f86929d91e6e1a9517393a89322
fix Issue 2417 - [module] protected base member is not available via base
handle in a derived class if it is defined in a separate module

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 23, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=2417


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla@digitalmars.com
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
1 2
Next ›   Last »