Browse Source

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>>'

tags/V1_5_0M3
aclement 19 years ago
parent
commit
311d26eeec
1 changed files with 30 additions and 0 deletions
  1. 30
    0
      tests/java5/generics/itds/ReusingLetters.aj

+ 30
- 0
tests/java5/generics/itds/ReusingLetters.aj View File

@@ -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) {};
}

Loading…
Cancel
Save