Index: test/mjsunit/try.js |
diff --git a/test/mjsunit/try.js b/test/mjsunit/try.js |
index 0bd78b4332ee5cf8b55484253387c0b861c13869..794860a7c6484df04139be599285c7d7579cbd35 100644 |
--- a/test/mjsunit/try.js |
+++ b/test/mjsunit/try.js |
@@ -347,3 +347,48 @@ assertTrue(broke); |
assertFalse(caught); |
assertTrue(finalized); |
+function return_from_nested_finally_in_finally() { |
+ try { |
+ return 1; |
+ } finally { |
+ try { |
+ return 2; |
+ } finally { |
+ return 42; |
+ } |
+ } |
+} |
+ |
+assertEquals(42, return_from_nested_finally_in_finally()); |
+ |
+function break_from_nested_finally_in_finally() { |
+ L: try { |
+ return 1; |
+ } finally { |
+ try { |
+ return 2; |
+ } finally { |
+ break L; |
+ } |
+ } |
+ return 42; |
+} |
+ |
+assertEquals(42, break_from_nested_finally_in_finally()); |
+ |
+function continue_from_nested_finally_in_finally() { |
+ do { |
+ try { |
+ return 1; |
+ } finally { |
+ try { |
+ return 2; |
+ } finally { |
+ continue; |
+ } |
+ } |
+ } while (false); |
+ return 42; |
+} |
+ |
+assertEquals(42, continue_from_nested_finally_in_finally()); |