]> source.dussan.org Git - aspectj.git/commitdiff
two more bug testcases.
authoraclement <aclement>
Wed, 24 Aug 2005 17:49:08 +0000 (17:49 +0000)
committeraclement <aclement>
Wed, 24 Aug 2005 17:49:08 +0000 (17:49 +0000)
tests/bugs150/pr82989.aj [new file with mode: 0644]
tests/java5/generics/itds/bridgeMethods/pr91381_2.aj [new file with mode: 0644]

diff --git a/tests/bugs150/pr82989.aj b/tests/bugs150/pr82989.aj
new file mode 100644 (file)
index 0000000..76ce578
--- /dev/null
@@ -0,0 +1,22 @@
+class A {
+
+  public A(){}
+
+  private void m1() throws E {
+    throw new E(); 
+  }
+}
+
+privileged aspect B {
+
+  void A.m2() {
+    try {
+      m1(); 
+    } catch(E e) { // accessor generated for m1() should be defined to throw E
+    }
+  }
+}
+
+class E extends Exception{
+  public E(){}
+}
diff --git a/tests/java5/generics/itds/bridgeMethods/pr91381_2.aj b/tests/java5/generics/itds/bridgeMethods/pr91381_2.aj
new file mode 100644 (file)
index 0000000..78abec9
--- /dev/null
@@ -0,0 +1,16 @@
+public aspect pr91381_2 {
+  public abstract Object A.foo();
+
+  public static void main(String[] args) {
+    A a = new B();
+    System.out.println(a.foo());
+  }
+}
+
+abstract class A {
+//  abstract Object foo();
+}
+
+class B extends A {
+  public Integer foo() { return new Integer(42); }
+}