From: <ipe...@us...> - 2009-04-27 21:03:34
|
Revision: 8258 http://x10.svn.sourceforge.net/x10/?rev=8258&view=rev Author: ipeshansky Date: 2009-04-27 21:03:29 +0000 (Mon, 27 Apr 2009) Log Message: ----------- Fix XTENLANG-367 Modified Paths: -------------- trunk/x10.cppbackend.17/src/polyglot/ext/x10cpp/visit/MessagePassingCodeGenerator.java Added Paths: ----------- trunk/x10.tests/examples/Issues/XTENLANG_367.x10 Modified: trunk/x10.cppbackend.17/src/polyglot/ext/x10cpp/visit/MessagePassingCodeGenerator.java =================================================================== --- trunk/x10.cppbackend.17/src/polyglot/ext/x10cpp/visit/MessagePassingCodeGenerator.java 2009-04-27 20:08:28 UTC (rev 8257) +++ trunk/x10.cppbackend.17/src/polyglot/ext/x10cpp/visit/MessagePassingCodeGenerator.java 2009-04-27 21:03:29 UTC (rev 8258) @@ -2359,7 +2359,6 @@ sw.end(); sw.newline(); sw.write("}"); if (n.finallyBlock() != null) { - n.printBlock(n.finallyBlock(), sw, tr); sw.end(); sw.newline(); sw.write("} catch (...) {"); sw.newline(4); sw.begin(0); @@ -2368,6 +2367,8 @@ sw.write("throw;"); sw.end(); sw.newline(); sw.write("}"); + sw.newline(); + n.printBlock(n.finallyBlock(), sw, tr); } } Added: trunk/x10.tests/examples/Issues/XTENLANG_367.x10 =================================================================== --- trunk/x10.tests/examples/Issues/XTENLANG_367.x10 (rev 0) +++ trunk/x10.tests/examples/Issues/XTENLANG_367.x10 2009-04-27 21:03:29 UTC (rev 8258) @@ -0,0 +1,31 @@ +// (C) Copyright IBM Corporation 2008 +// This file is part of X10 Test. * + +import harness.x10Test; + +/** + * @author igor 4/2009 + */ + +class XTENLANG_367 extends x10Test { + + public def run(): boolean { + var count: int = 0; + try { + try { + count++; + throw new Exception(); + } catch (e: Exception) { + count++; + } finally { + count++; + throw new RuntimeException(); + } + } catch (e: RuntimeException) { } + return count == 3; + } + + public static def main(Rail[String]) { + new XTENLANG_367().execute(); + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |