[Issue 7534] Allow attribute-overloading of an overridden method

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Feb 24 04:32:10 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=7534


deadalnix <deadalnix at gmail.com> changed:

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


--- Comment #5 from deadalnix <deadalnix at gmail.com> 2012-02-24 04:32:05 PST ---
As I explained somewhere in the news group, the current behavior is
inconsistent.

We have to choose is const is a characteristic of the method or of its
arguments.

If it is a characteristic of its argument (the hidden argument this), then
const and non const method are 2 different methods, and shouldn't override each
other.

If this is a characteristic of the method, then we shouldn't be able to define
both const and non const version of the same method, just like we cannot define
both pure and impure version of a same function.

This problem is closely related to the return type const qualifier one, both
are symptoms of the same misconception in D spec.

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


More information about the Digitalmars-d-bugs mailing list