summaryrefslogtreecommitdiffstats
path: root/tests/java5
diff options
context:
space:
mode:
Diffstat (limited to 'tests/java5')
-rw-r--r--tests/java5/generics/bugs/lists/case1/IdentifiableAspect.java2
-rw-r--r--tests/java5/generics/bugs/lists/case3/Bean.java2
-rw-r--r--tests/java5/generics/bugs/lists/case3/Identifiable.java5
-rw-r--r--tests/java5/generics/bugs/lists/case3/IdentifiableAspect.java20
-rw-r--r--tests/java5/generics/bugs/lists/case3/LongIdentifiable.java2
5 files changed, 30 insertions, 1 deletions
diff --git a/tests/java5/generics/bugs/lists/case1/IdentifiableAspect.java b/tests/java5/generics/bugs/lists/case1/IdentifiableAspect.java
index 32fe42390..7b150fa59 100644
--- a/tests/java5/generics/bugs/lists/case1/IdentifiableAspect.java
+++ b/tests/java5/generics/bugs/lists/case1/IdentifiableAspect.java
@@ -12,6 +12,6 @@ public aspect IdentifiableAspect {
}
public static void main(String []argv) {
- new Bean();
+ Bean b = new Bean();
}
}
diff --git a/tests/java5/generics/bugs/lists/case3/Bean.java b/tests/java5/generics/bugs/lists/case3/Bean.java
new file mode 100644
index 000000000..6444e4a92
--- /dev/null
+++ b/tests/java5/generics/bugs/lists/case3/Bean.java
@@ -0,0 +1,2 @@
+
+public class Bean {}
diff --git a/tests/java5/generics/bugs/lists/case3/Identifiable.java b/tests/java5/generics/bugs/lists/case3/Identifiable.java
new file mode 100644
index 000000000..645ee36de
--- /dev/null
+++ b/tests/java5/generics/bugs/lists/case3/Identifiable.java
@@ -0,0 +1,5 @@
+public interface Identifiable<T> {
+ T getId();
+
+ void setId(T t);
+}
diff --git a/tests/java5/generics/bugs/lists/case3/IdentifiableAspect.java b/tests/java5/generics/bugs/lists/case3/IdentifiableAspect.java
new file mode 100644
index 000000000..a9cb3f73f
--- /dev/null
+++ b/tests/java5/generics/bugs/lists/case3/IdentifiableAspect.java
@@ -0,0 +1,20 @@
+public aspect IdentifiableAspect {
+ declare parents: Bean implements LongIdentifiable;
+
+ private Long LongIdentifiable.m_id;
+
+ public Long LongIdentifiable.getId() {
+ return m_id;
+ }
+
+ public void LongIdentifiable.setId(Long 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/case3/LongIdentifiable.java b/tests/java5/generics/bugs/lists/case3/LongIdentifiable.java
new file mode 100644
index 000000000..37fa76252
--- /dev/null
+++ b/tests/java5/generics/bugs/lists/case3/LongIdentifiable.java
@@ -0,0 +1,2 @@
+public interface LongIdentifiable extends Identifiable<Long> {
+}