warning ... is hidden in ...

Jarrett Billingsley kb3ctd2 at yahoo.com
Fri May 2 19:47:33 PDT 2008

"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.

Try either putting 'override' on your implementation of opCmp, or doing 
"alias super.opCmp opCmp" inside the class declaration.  I'ven't got the D2 
compiler on me to test :S 

More information about the Digitalmars-d-learn mailing list