warning ... is hidden in ...

Derek Parnell derek at psych.ward
Fri May 2 23:31:00 PDT 2008

On Fri, 2 May 2008 22:47:33 -0400, Jarrett Billingsley wrote:

> "Derek Parnell" <derek at psych.ward> wrote in message 
> news:1pg84i0mr3ihw$.1ng68jjvixchm$.dlg at 40tude.net...
>> Using dmd 2.013 I'm now getting some messages along the lines of ...
>>  warning: class Foo Object opCmp is hidden in Foo
>> What does this actually mean and how can I remove the warning (without
>> removing the -w switch)?
> It means that Object.opCmp has the signature "int(Object)" whereas your 
> class's opCmp has the signature "int(<something other than Object>)".  In 
> other words, you're hiding the base class implementation of opCmp.

"hiding"?! Isn't one of the features of OO the ability to create
specialized methods that override the parent class' method of the same
> Try either putting 'override' on your implementation of opCmp,

Tried that and got "function Foo.opCmp does not override any function"

> or doing "alias super.opCmp opCmp" inside the class declaration.

Tried that and I got "basic type expected, not super"

Any other suggestions gladly accepted ;-)

Derek Parnell
Melbourne, Australia
skype: derek.j.parnell

More information about the Digitalmars-d-learn mailing list