diff options
Diffstat (limited to 'tests/bugs')
-rw-r--r-- | tests/bugs/TrySwitch.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/bugs/TrySwitch.java b/tests/bugs/TrySwitch.java new file mode 100644 index 000000000..b767f09bc --- /dev/null +++ b/tests/bugs/TrySwitch.java @@ -0,0 +1,26 @@ +public class TrySwitch { + public static void main(String[] args) throws Throwable { + m(10); + } + + static boolean done = true; + static int m(int i) { + try { + switch(i) { + default: return 10; + case 10: + if (false) { + break; + } else { + throw new RuntimeException(); + } + case 11: break; + } + } catch (Throwable e) { + System.err.println("caught: " + e); + } + return 33; + } +} + + |