Implicit const
Craig Black
craigblack2 at cox.net
Thu Apr 3 08:55:52 PDT 2008
"Janice Caron" <caron800 at googlemail.com> wrote in message
news:mailman.306.1207222160.2351.digitalmars-d at puremagic.com...
> On 03/04/2008, Ary Borenszweig <ary at esperanto.org.ar> wrote:
>> But maybe you want that function to be overriden by subclasses. Maybe if
>> it
>> were "final int f()", then it could say that.
>>
>> What about const? Does a const function must be overriden by a const
>> function?
>
> I said warning, not error. A warning is not an error. I propose /no/
> changes here to legal D. Warnings are an entirely different beast. But
> D doesn't have warnings, so the question is moot. Perhaps some
> third-party app could be written to emit such warnings, I don't know.
Just don't issue the warning if the function is overriden. The compiler
could be smart enough to do that.
More information about the Digitalmars-d
mailing list