Update of /cvsroot/nice/Nice
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9467
Modified Files:
NEWS
Log Message:
Method overrides.
Index: NEWS
===================================================================
RCS file: /cvsroot/nice/Nice/NEWS,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** NEWS 1 Mar 2004 16:04:18 -0000 1.26
--- NEWS 3 Mar 2004 15:42:29 -0000 1.27
***************
*** 1,4 ****
--- 1,15 ----
nice (0.9.7)
+ * Methods can be overriden using the override keyword:
+ class A {
+ A doSomething() { ... }
+ }
+ class B extends A {
+ override B doSomething() { ... }
+ }
+ An important aspect is that the return type can be more precise than the
+ original type (covariance).
+ Overriding without the override keyword (a la Java) is accepted but
+ generates a warning.
* When importing a java package, it is possible to specify that its methods
do not accept null arguments:
|