Re: Method overrides and covariant return types

Daniel Bonniot <[email protected]> Thu, 04 Mar 2004 18:34:40 +0100
Newsgroups gmane.comp.lang.nice.general
Message-ID <[email protected]>
>Is there a way a compiler switch to hide warnings?
>(Yes we will want to see them, but maybe we need to fix errors first.)
>  
>
There is no way at the moment. Arjan also suggested a '--nowarn' option, 
which I agree would be useful.

>What's the story with overloading now?
>  
>
Ad-hoc overloading is still available. That is, you can declare still 
several methods with the same name that are differenciated by their 
number, name and type of arguments.

Additionally, when a method overrides another one (its argument types 
are all subtypes of the original argument types), then all of its 
implementations belong to both the base and the overriden method. 
Specialized methods can have either the same return type, or a subtype 
of the return type of every method they override.

Daniel



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click