[Nice-commit] Nice/testsuite/compiler/statements/variables scoping.testsuite,1.2,1.3
Brought to you by:
bonniot
|
From: Daniel B. <bo...@us...> - 2005-02-22 12:53:28
|
Update of /cvsroot/nice/Nice/testsuite/compiler/statements/variables In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15145/testsuite/compiler/statements/variables Modified Files: scoping.testsuite Log Message: Make sure try and synchronized statements have real blocks as substatements so that scoping works as expected. Index: scoping.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/statements/variables/scoping.testsuite,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** scoping.testsuite 7 Oct 2004 22:03:45 -0000 1.2 --- scoping.testsuite 22 Feb 2005 12:53:15 -0000 1.3 *************** *** 20,21 **** --- 20,58 ---- this(); } + + /// PASS + try { + int x = 1; + } catch(Error e) { + int x = 2; + } finally { + int x = 3; + } + + /// PASS + try { + int x = 1; + } catch(Error e) { + } + int x = 2; + + /// PASS + try { + } catch(Error e) { + int x = 1; + } + int x = 2; + + /// PASS + try { + } finally { + int x = 1; + } + int x = 2; + + /// PASS + String s = ""; + synchronized(s) { + int x = 1; + } + int x = 2; |