aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs/interAbstract
diff options
context:
space:
mode:
authorjhugunin <jhugunin>2003-04-10 22:20:14 +0000
committerjhugunin <jhugunin>2003-04-10 22:20:14 +0000
commit808bae83b3d5f37de4b39a2380db2782919a5f8a (patch)
tree576a779c6662eee340976c3be03cf7e8fb9c1fab /tests/bugs/interAbstract
parentaf3c9f96769fd9a517f688e64706903dca63ade9 (diff)
downloadaspectj-808bae83b3d5f37de4b39a2380db2782919a5f8a.tar.gz
aspectj-808bae83b3d5f37de4b39a2380db2782919a5f8a.zip
test and fix for
Bugzilla Bug 36046 inter-type declaration bug with abstract classes
Diffstat (limited to 'tests/bugs/interAbstract')
-rw-r--r--tests/bugs/interAbstract/Driver.java35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/bugs/interAbstract/Driver.java b/tests/bugs/interAbstract/Driver.java
new file mode 100644
index 000000000..1f2f37cd9
--- /dev/null
+++ b/tests/bugs/interAbstract/Driver.java
@@ -0,0 +1,35 @@
+//Bugzilla Bug 36046
+// inter-type declaration bug with abstract classes
+
+public class Driver {
+ public static void main(String args[]) {
+ Derived generator = new Derived();
+ System.out.println(generator.getExecutions("processEvents"));
+ }
+ static aspect MonitorBase {
+ declare parents: Base implements ExecutionMonitor.MonitoredItem;
+ }
+}
+
+class Derived extends Base {
+ public String getName() {
+ return null;
+ }
+}
+
+abstract class Base {
+ abstract public String getName();
+}
+
+aspect ExecutionMonitor {
+ /** marker interface to indicate the execution monitor should track calls
+and executions on this class. */
+ public interface MonitoredItem {
+ int getExecutions(String methodName);
+ }
+
+ /** a Map of events to mutable integers */
+ public int MonitoredItem.getExecutions(String methodName) {
+ return 0;
+ }
+} \ No newline at end of file