diff options
author | aclement <aclement> | 2005-08-08 15:18:46 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-08-08 15:18:46 +0000 |
commit | 311d26eeec387fc6365734d4d9991bb99f962325 (patch) | |
tree | 389e37959e3ef7c1c42a7712a77eaee96a169cdb /tests/java5 | |
parent | f8e91b592311c086077b3e9d4e6c87efb56a634e (diff) | |
download | aspectj-311d26eeec387fc6365734d4d9991bb99f962325.tar.gz aspectj-311d26eeec387fc6365734d4d9991bb99f962325.zip |
genericitds: reusing similar specifications for type variables in the same aspect 'Comparable<? super T/P>'. If our logic isnt working correctly, it reports a problem with calls to the second ITD thinking it is specified as '<P extends Object & Comparable<? super T>>'
Diffstat (limited to 'tests/java5')
-rw-r--r-- | tests/java5/generics/itds/ReusingLetters.aj | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/java5/generics/itds/ReusingLetters.aj b/tests/java5/generics/itds/ReusingLetters.aj new file mode 100644 index 000000000..9dda34f04 --- /dev/null +++ b/tests/java5/generics/itds/ReusingLetters.aj @@ -0,0 +1,30 @@ +import java.util.*; + +class Victim {} + +public class ReusingLetters { + public static void main(String []argv) { + Victim v = new Victim(); + + List<A> as = new ArrayList<A>(); + v.b(as); + v.c(as); + + + } + +} + +class A implements Comparable<A> { + public int compareTo(A a) { return 0; } +} + +aspect X { + + public <T extends Object & Comparable<? super T>> + void Victim.b(List<T> l) {} + + public <P extends Object & Comparable<? super P>> + void Victim.c(List<P> col) {}; + +} |