summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2005-12-12 19:14:16 +0000
committeraclement <aclement>2005-12-12 19:14:16 +0000
commit107bdfa4da65cd983fcdf92e9b6a15341940e304 (patch)
tree769879700e816cd6161d6b01dfaaf1d6b634a15c
parent3ac46270398a3e9ddde620e03c9dc2123cbe78d0 (diff)
downloadaspectj-107bdfa4da65cd983fcdf92e9b6a15341940e304.tar.gz
aspectj-107bdfa4da65cd983fcdf92e9b6a15341940e304.zip
119749 test program.
-rw-r--r--tests/bugs150/pr119749/InheritedThrows.java33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/bugs150/pr119749/InheritedThrows.java b/tests/bugs150/pr119749/InheritedThrows.java
new file mode 100644
index 000000000..d29a72089
--- /dev/null
+++ b/tests/bugs150/pr119749/InheritedThrows.java
@@ -0,0 +1,33 @@
+public class InheritedThrows {
+
+ static aspect A {
+ declare warning : execution (* *.*(..) throws Ex1) : "one";
+// declare warning : execution (* *.*(..) throws Ex2) : "two";
+// declare warning : execution (* *.*(..) throws !(Ex1||Ex2)) : "neither";
+// declare warning : execution (* *.*(..) throws Ex1, Ex2) : "both";
+ }
+
+ public static class Ex1 extends Exception {}
+
+ public static class Ex2 extends Exception {}
+
+ public interface MyInterface {
+ public void m() throws Ex1, Ex2;
+ }
+
+ private static class NestedClass1 implements MyInterface {
+ public void m() throws Ex1 {}
+ }
+
+ private static class NestedClass2 implements MyInterface {
+ public void m() throws Ex2 {}
+ }
+
+ private static class NestedClassBoth implements MyInterface {
+ public void m() throws Ex1, Ex2 {}
+ }
+
+ private static class NestedClassNeither implements MyInterface {
+ public void m() {}
+ }
+}