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


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |INVALID


--- Comment #9 from Walter Bright <bugzilla@digitalmars.com> 2012-01-23 19:36:45 PST ---
The return types are the issue. You cannot, for example, override a function that returns a mutable array with one that returns an immutable one. It would be a giant hole in the type system.

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


timon.gehr@gmx.ch changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |


--- Comment #10 from timon.gehr@gmx.ch 2012-01-24 07:18:45 PST ---
The signature of the overriding function is identical to the overridden one in all cases discussed here.

class A{
    void f(){} // note: return type void
}
class B: A{
    override void f(){} // overrides base f
    void f()immutable{} // new overload
    void f()shared{}       // new overload
}

It is impossible to break the type system (even if the return types would be different): the new overloads are not even reachable through a base class reference. The bug is that the compiler does not take into account the storage class of the hidden this pointer while deciding what overrides what.

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


Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull


--- Comment #11 from Kenji Hara <k.hara.pg@gmail.com> 2012-03-03 07:18:10 PST ---
https://github.com/D-Programming-Language/dmd/pull/779

I also think this never breaks type systems, and additional overloads is
useful.
e.g. http://d.puremagic.com/issues/show_bug.cgi?id=7534#c6

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


Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Next ›   Last »
1 2
Top | Discussion index | About this forum | D home