diff options
author | acolyer <acolyer> | 2004-01-14 11:12:27 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2004-01-14 11:12:27 +0000 |
commit | 5c4db9cb620918dcf064ddbfc50f54130d3b2cab (patch) | |
tree | aac96c5782acfad95f20ccb6f50e930c083a96a0 /tests/bugs | |
parent | b8d42c06d69f44e8c87a9b7d3ea290de0d18ed37 (diff) | |
download | aspectj-5c4db9cb620918dcf064ddbfc50f54130d3b2cab.tar.gz aspectj-5c4db9cb620918dcf064ddbfc50f54130d3b2cab.zip |
Fix for Bugzilla Bug 49784
declaring interface methods should work as it does in interface
and Bugzilla Bug 45676
AspectJ enhanced code can not be used with plain old java anymo
and Bugzilla Bug 43972
Static crosscutting makes interfaces unusable for javac
Diffstat (limited to 'tests/bugs')
-rw-r--r-- | tests/bugs/abstractMethods/abstractClass/B.java | 7 | ||||
-rw-r--r-- | tests/bugs/abstractMethods/abstractClass/C.java | 6 | ||||
-rw-r--r-- | tests/bugs/abstractMethods/abstractClass/jars/AandB.jar | bin | 0 -> 1527 bytes | |||
-rw-r--r-- | tests/bugs/abstractMethods/interface/A.java | 5 | ||||
-rw-r--r-- | tests/bugs/abstractMethods/interface/B.java | 1 | ||||
-rw-r--r-- | tests/bugs/abstractMethods/interface/C.java | 5 | ||||
-rw-r--r-- | tests/bugs/abstractMethods/interface/jars/AandB.jar | bin | 0 -> 1476 bytes | |||
-rw-r--r-- | tests/bugs/abstractMethods/singlesource/C.java | 14 | ||||
-rw-r--r-- | tests/bugs/abstractMethods/singlesource/C1.java | 17 | ||||
-rw-r--r-- | tests/bugs/abstractMethods/singlesource/C2.java | 16 | ||||
-rw-r--r-- | tests/bugs/interfaceDefinition/Main1.java | 8 | ||||
-rw-r--r-- | tests/bugs/interfaceDefinition/pack/DefineInterface.java | 1 |
12 files changed, 79 insertions, 1 deletions
diff --git a/tests/bugs/abstractMethods/abstractClass/B.java b/tests/bugs/abstractMethods/abstractClass/B.java new file mode 100644 index 000000000..e63e581b7 --- /dev/null +++ b/tests/bugs/abstractMethods/abstractClass/B.java @@ -0,0 +1,7 @@ +abstract class B {} + +aspect A { + abstract void B.m(); + + public static void doit(B b) { b.m(); } +}
\ No newline at end of file diff --git a/tests/bugs/abstractMethods/abstractClass/C.java b/tests/bugs/abstractMethods/abstractClass/C.java new file mode 100644 index 000000000..04b499e96 --- /dev/null +++ b/tests/bugs/abstractMethods/abstractClass/C.java @@ -0,0 +1,6 @@ +public class C extends B { + public static void main(String[] args) { + A.doit(new C()); + } +} + diff --git a/tests/bugs/abstractMethods/abstractClass/jars/AandB.jar b/tests/bugs/abstractMethods/abstractClass/jars/AandB.jar Binary files differnew file mode 100644 index 000000000..4ca677f97 --- /dev/null +++ b/tests/bugs/abstractMethods/abstractClass/jars/AandB.jar diff --git a/tests/bugs/abstractMethods/interface/A.java b/tests/bugs/abstractMethods/interface/A.java new file mode 100644 index 000000000..3eed777e4 --- /dev/null +++ b/tests/bugs/abstractMethods/interface/A.java @@ -0,0 +1,5 @@ +aspect A { + void B.m(){} + + public static void doit(B b) { b.m(); } +}
\ No newline at end of file diff --git a/tests/bugs/abstractMethods/interface/B.java b/tests/bugs/abstractMethods/interface/B.java new file mode 100644 index 000000000..a09e44742 --- /dev/null +++ b/tests/bugs/abstractMethods/interface/B.java @@ -0,0 +1 @@ +interface B {}
\ No newline at end of file diff --git a/tests/bugs/abstractMethods/interface/C.java b/tests/bugs/abstractMethods/interface/C.java new file mode 100644 index 000000000..99fc42f3d --- /dev/null +++ b/tests/bugs/abstractMethods/interface/C.java @@ -0,0 +1,5 @@ +public class C implements B { + public static void main(String[] args) { + A.doit(new C()); + } +} diff --git a/tests/bugs/abstractMethods/interface/jars/AandB.jar b/tests/bugs/abstractMethods/interface/jars/AandB.jar Binary files differnew file mode 100644 index 000000000..9d71c0c87 --- /dev/null +++ b/tests/bugs/abstractMethods/interface/jars/AandB.jar diff --git a/tests/bugs/abstractMethods/singlesource/C.java b/tests/bugs/abstractMethods/singlesource/C.java new file mode 100644 index 000000000..ddbc91b46 --- /dev/null +++ b/tests/bugs/abstractMethods/singlesource/C.java @@ -0,0 +1,14 @@ +abstract class B {} + +aspect A { + abstract void B.m(); + + public static void doit(B b) { b.m(); } +} + +public class C extends B { + public static void main(String[] args) { + A.doit(new C()); + } +} + diff --git a/tests/bugs/abstractMethods/singlesource/C1.java b/tests/bugs/abstractMethods/singlesource/C1.java new file mode 100644 index 000000000..881d00015 --- /dev/null +++ b/tests/bugs/abstractMethods/singlesource/C1.java @@ -0,0 +1,17 @@ +abstract class B {} + +aspect A { + abstract void B.m(); + + public static void doit(B b) { b.m(); } +} + +public class C1 extends B { + public static void main(String[] args) { + A.doit(new C1()); + } +} + +aspect A1 { + void C1.m() {} +} diff --git a/tests/bugs/abstractMethods/singlesource/C2.java b/tests/bugs/abstractMethods/singlesource/C2.java new file mode 100644 index 000000000..545fc9daa --- /dev/null +++ b/tests/bugs/abstractMethods/singlesource/C2.java @@ -0,0 +1,16 @@ +abstract class B {} + +aspect A { + public abstract void B.m(); + + public static void doit(B b) { b.m(); } +} + +public class C2 extends B { + public static void main(String[] args) { + A.doit(new C2()); + } + + public void m() {} +} + diff --git a/tests/bugs/interfaceDefinition/Main1.java b/tests/bugs/interfaceDefinition/Main1.java new file mode 100644 index 000000000..b942dc7df --- /dev/null +++ b/tests/bugs/interfaceDefinition/Main1.java @@ -0,0 +1,8 @@ + +/** @testcase PR#43972 Use class implementing interface via aspect */ +public class Main1 { + public static void main(String[] args) { + pack.MyInterface i = new pack.InterfaceDefinition.C(); + i.m(); + } +} diff --git a/tests/bugs/interfaceDefinition/pack/DefineInterface.java b/tests/bugs/interfaceDefinition/pack/DefineInterface.java index 0e3df5dc8..2fab84f74 100644 --- a/tests/bugs/interfaceDefinition/pack/DefineInterface.java +++ b/tests/bugs/interfaceDefinition/pack/DefineInterface.java @@ -7,7 +7,6 @@ public aspect DefineInterface { declare parents: InterfaceDefinition.C implements MyInterface; static { Tester.expectEvent("m()"); - Tester.expectEvent("p()"); } public void MyInterface.m() { Tester.event("m()"); |