Re: Method overrides and covariant return types

Isaac Gouy <[email protected]> Thu, 4 Mar 2004 08:31:43 -0800 (PST)
Newsgroups gmane.comp.lang.nice.general
Message-ID <[email protected]>
> > The development version now implements method overrides.  
> If there is no major problem with this, I'm planning to make a new 
> release shortly, as we have seen that this new feature should 
> significantly help newcomers.

The example from the changes page doesn't seem to compile?

   class A {
      A doSomething() { }
   }

   class B extends A {
      override B doSomething() {}
   }


\test\main.nice: line 6, column 4:
Encountered "override B doSomething (".
Was expecting one of:
    "(" ...
    "{" ...
    "?" ...
    "!" ...
    "<" ...
    "alike" ...
    "public" ...
    "private" ...
    <BACKQUOTEDSTRING> ...
    <IDENT> ...
    "override" "?" ...
    "override" "!" ...
    "override" "(" ...
    "override" "alike" ...
    "override" <IDENT> "." ...
    "override" <IDENT> "<" ...
    "override" <IDENT> "[]" ...
    "override" <IDENT> "[?]" ...
    "override" <IDENT> "?" ...
    "override" <IDENT> "->" ...
    "override" <IDENT> <IDENT> "=" ...
    "override" <IDENT> <IDENT> ";" ...


Nice compiler version 0.9.7 prerelease (build 2004.03.02, 11:21:04 UTC)



__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com


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