diff options
author | aclement <aclement> | 2005-11-17 08:37:16 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-11-17 08:37:16 +0000 |
commit | a7e84c66fc7ced725454c0135fffdb237c899403 (patch) | |
tree | 9df092ffd44b9141b15669cff9f8f0f5b1ec00e5 /tests/java5 | |
parent | abb5d6c097d8c0ec8f33dc95342732855148bb18 (diff) | |
download | aspectj-a7e84c66fc7ced725454c0135fffdb237c899403.tar.gz aspectj-a7e84c66fc7ced725454c0135fffdb237c899403.zip |
more tests - for 115237 and alexs bug on the list.
Diffstat (limited to 'tests/java5')
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> { +} |