aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs/TrySwitch.java
diff options
context:
space:
mode:
authorjhugunin <jhugunin>2003-06-02 20:21:32 +0000
committerjhugunin <jhugunin>2003-06-02 20:21:32 +0000
commite82e02a571325c67027706571995ca8df97ba035 (patch)
treed5cdccee43f9a02fe83eb9fac76b21ce8e059d91 /tests/bugs/TrySwitch.java
parente76e67fddf6081780c06faf9b602de5296f82769 (diff)
downloadaspectj-e82e02a571325c67027706571995ca8df97ba035.tar.gz
aspectj-e82e02a571325c67027706571995ca8df97ba035.zip
added test for Bugzilla Bug 38345
VerifyError, Inconsistent stack height with try/switch/if combination
Diffstat (limited to 'tests/bugs/TrySwitch.java')
-rw-r--r--tests/bugs/TrySwitch.java26
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;
+ }
+}
+
+