aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraclement <aclement>2005-09-27 12:56:26 +0000
committeraclement <aclement>2005-09-27 12:56:26 +0000
commit10a0985aa2c2e4eb9ba631eb0bfba41a96829214 (patch)
tree90c2f78b952b789bf6ee5f15fb272eb38570fc52 /tests
parent24e42cff3410e4b427a233112ab0c9b7d43f0ea1 (diff)
downloadaspectj-10a0985aa2c2e4eb9ba631eb0bfba41a96829214.tar.gz
aspectj-10a0985aa2c2e4eb9ba631eb0bfba41a96829214.zip
pr110307: test cases.
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs150/pr110307/Problem1.java42
-rw-r--r--tests/bugs150/pr110307/Problem2.java48
2 files changed, 90 insertions, 0 deletions
diff --git a/tests/bugs150/pr110307/Problem1.java b/tests/bugs150/pr110307/Problem1.java
new file mode 100644
index 000000000..b0b3f8d66
--- /dev/null
+++ b/tests/bugs150/pr110307/Problem1.java
@@ -0,0 +1,42 @@
+import java.lang.annotation.*;
+import java.lang.ref.*;
+
+class Product{}
+class ProductType{}
+
+interface AssociationSource<T> {
+
+ Link<T> getTarget();
+
+ void setTarget(Link<T> _target);
+
+}
+aspect ExtendProduct {
+ Link<T> AssociationSource._target = null;
+
+ public Link<T> AssociationSource.getTarget() {
+ return _target;
+ }
+
+ public void AssociationSource.setTarget(Link<T> _target) {
+ this._target = _target;
+ }
+
+ declare parents : ProductType implements AssociationSource<Product>;
+ declare parents : Product implements AssociationSource<Branch>;
+ declare parents : Branch implements AssociationSource<Revision>;
+}
+
+class Link<T> extends SoftReference {
+
+ @SuppressWarnings("unchecked")
+ Link(List<T> endPoints) {
+ super(endPoints);
+ }
+
+ @SuppressWarnings("unchecked")
+ public List<T> getEndPoints() {
+ return (List<T>)get();
+ }
+
+}
diff --git a/tests/bugs150/pr110307/Problem2.java b/tests/bugs150/pr110307/Problem2.java
new file mode 100644
index 000000000..f68ed57d7
--- /dev/null
+++ b/tests/bugs150/pr110307/Problem2.java
@@ -0,0 +1,48 @@
+import java.util.*;
+import java.lang.annotation.*;
+import java.lang.ref.*;
+
+class Product {}
+class ProductType{}
+class Branch {}
+class Revision {}
+
+interface AssociationSource<T> {
+
+ Link<T> getTarget();
+
+ void setTarget(Link<T> _target);
+
+}
+aspect ExtendProduct {
+ Link<T> AssociationSource<T>._target = null;
+
+ public Link<T> AssociationSource<T>.getTarget() {
+ return _target;
+ }
+
+ public void AssociationSource<T>.setTarget(Link<T> _target) {
+ this._target = _target;
+ }
+
+ declare parents : ProductType implements AssociationSource<Product>;
+/*
+ declare parents : Product implements AssociationSource<Branch>;
+ declare parents : Branch implements AssociationSource<Revision>;
+*/
+}
+
+class Link<T> {//extends SoftReference {
+
+/* @SuppressWarnings("unchecked")
+ Link(List<T> endPoints) {
+ super(endPoints);
+ }
+
+ @SuppressWarnings("unchecked")
+ public List<T> getEndPoints() {
+ return (List<T>)get();
+ }
+*/
+
+}