aboutsummaryrefslogtreecommitdiffstats
path: root/tests/java5
diff options
context:
space:
mode:
authoraclement <aclement>2005-11-17 08:56:15 +0000
committeraclement <aclement>2005-11-17 08:56:15 +0000
commit608688ca74d3c19da3124a917c390232bca610a2 (patch)
tree2c23026157a6c73d4f9da6cbc81fdb176ca6d49a /tests/java5
parent4e13e4ee390f65906c13f63c2fca29010db63468 (diff)
downloadaspectj-608688ca74d3c19da3124a917c390232bca610a2.tar.gz
aspectj-608688ca74d3c19da3124a917c390232bca610a2.zip
case4 of Alex's bug ;)
Diffstat (limited to 'tests/java5')
-rw-r--r--tests/java5/generics/bugs/lists/case4/Bean.java2
-rw-r--r--tests/java5/generics/bugs/lists/case4/Identifiable.java5
-rw-r--r--tests/java5/generics/bugs/lists/case4/IdentifiableAspect.java20
-rw-r--r--tests/java5/generics/bugs/lists/case4/LongIdentifiable.java2
4 files changed, 29 insertions, 0 deletions
diff --git a/tests/java5/generics/bugs/lists/case4/Bean.java b/tests/java5/generics/bugs/lists/case4/Bean.java
new file mode 100644
index 000000000..6444e4a92
--- /dev/null
+++ b/tests/java5/generics/bugs/lists/case4/Bean.java
@@ -0,0 +1,2 @@
+
+public class Bean {}
diff --git a/tests/java5/generics/bugs/lists/case4/Identifiable.java b/tests/java5/generics/bugs/lists/case4/Identifiable.java
new file mode 100644
index 000000000..645ee36de
--- /dev/null
+++ b/tests/java5/generics/bugs/lists/case4/Identifiable.java
@@ -0,0 +1,5 @@
+public interface Identifiable<T> {
+ T getId();
+
+ void setId(T t);
+}
diff --git a/tests/java5/generics/bugs/lists/case4/IdentifiableAspect.java b/tests/java5/generics/bugs/lists/case4/IdentifiableAspect.java
new file mode 100644
index 000000000..26b162f69
--- /dev/null
+++ b/tests/java5/generics/bugs/lists/case4/IdentifiableAspect.java
@@ -0,0 +1,20 @@
+public aspect IdentifiableAspect {
+ declare parents: Bean implements LongIdentifiable;
+
+ private T Identifiable<T>.m_id;
+
+ public T Identifiable<T>.getId() {
+ return m_id;
+ }
+
+ public void Identifiable<T>.setId(T id) {
+ m_id= id;
+ }
+
+ public static void main(String []argv) {
+ Bean b = new Bean();
+ b.setId(37L);
+ long l = b.getId();
+ if (l!=37L) throw new RuntimeException("id should be 37");
+ }
+}
diff --git a/tests/java5/generics/bugs/lists/case4/LongIdentifiable.java b/tests/java5/generics/bugs/lists/case4/LongIdentifiable.java
new file mode 100644
index 000000000..37fa76252
--- /dev/null
+++ b/tests/java5/generics/bugs/lists/case4/LongIdentifiable.java
@@ -0,0 +1,2 @@
+public interface LongIdentifiable extends Identifiable<Long> {
+}