[Nice-commit] Nice/testsuite/compiler/functions return.testsuite,1.1,1.2
Brought to you by:
bonniot
From: <bo...@us...> - 2003-05-09 11:31:43
|
Update of /cvsroot/nice/Nice/testsuite/compiler/functions In directory sc8-pr-cvs1:/tmp/cvs-serv1948/testsuite/compiler/functions Modified Files: return.testsuite Log Message: Started support for flow analysis of loops with constant test. For this to really work, the booleans true and false will need to be considered as true constants, instead of the current global variables. This will be done after 0.8 is released. Index: return.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/functions/return.testsuite,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** return.testsuite 9 May 2003 08:59:11 -0000 1.1 --- return.testsuite 9 May 2003 11:31:40 -0000 1.2 *************** *** 13,16 **** --- 13,32 ---- /// FAIL + ///Toplevel + String f(String b) { + while (true) { + try { + if (b == "") + break; + return "f2(b)"; + } catch(Exception e) { + // modify and try again + b = "adjust(b)"; + } + } + // No return in this case. + } + + /// FAIL int x = 0; // local function |