From 107bdfa4da65cd983fcdf92e9b6a15341940e304 Mon Sep 17 00:00:00 2001 From: aclement Date: Mon, 12 Dec 2005 19:14:16 +0000 Subject: [PATCH] 119749 test program. --- tests/bugs150/pr119749/InheritedThrows.java | 33 +++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 tests/bugs150/pr119749/InheritedThrows.java 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() {} + } +} -- 2.39.5