[Nice-commit] Nice NEWS,1.67,1.68
Brought to you by:
bonniot
|
From: Artem Gr K. <ar...@us...> - 2005-03-07 20:53:23
|
Update of /cvsroot/nice/Nice In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11965 Modified Files: NEWS Log Message: RFE 681385 implemented. Index: NEWS =================================================================== RCS file: /cvsroot/nice/Nice/NEWS,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** NEWS 7 Mar 2005 17:10:54 -0000 1.67 --- NEWS 7 Mar 2005 20:52:55 -0000 1.68 *************** *** 6,19 **** // Test if a bad implementation has returned null instead of exception. if(maybeNull(prng) == null) workaround(); ! * Nullness analysis of assignments (RFE 681385) is partially implemented. It is now possible to write: ! class Foo {} ! var ?Foo FOO_INSTANCE = null; ! Foo getFooInstance(){ ! var instance = FOO_INSTANCE; if( null != instance ) return instance; ! instance = new Foo(); FOO_INSTANCE = instance; return instance; } ! becouse Nice will detect that "instance" is of a "sure type" ! after the "instance = new Foo();" assignment. * Allow value returns in void methods. It's useful when exiting from the method in a branch after doing a single operation. For instance, --- 6,20 ---- // Test if a bad implementation has returned null instead of exception. if(maybeNull(prng) == null) workaround(); ! * Nullness analysis of assignments (RFE 681385) is implemented. It is now possible to write: ! Foo func( ?Foo foo ) { ! if( foo == null ) { ! foo = new Foo(); ! } ! // Do some operations ! return foo; } ! since Nice will detect that foo can't be null after the "foo = new Foo()", ! and will propagate this information outside of "if( foo == null )" checks. * Allow value returns in void methods. It's useful when exiting from the method in a branch after doing a single operation. For instance, |