diff options
author | aclement <aclement> | 2005-10-18 08:23:16 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-10-18 08:23:16 +0000 |
commit | 447a7a1842c1be0e31245cb3cfa1e3e82e939711 (patch) | |
tree | 62539b50e0f220d1a01fb207143d0d8d66c7495c /tests/bugs150 | |
parent | 96e89dadd94df6a1af23537e205944ed7d20e209 (diff) | |
download | aspectj-447a7a1842c1be0e31245cb3cfa1e3e82e939711.tar.gz aspectj-447a7a1842c1be0e31245cb3cfa1e3e82e939711.zip |
pr110307: testcode
Diffstat (limited to 'tests/bugs150')
-rw-r--r-- | tests/bugs150/pr110307/Case1.java | 6 | ||||
-rw-r--r-- | tests/bugs150/pr110307/Case7.java | 59 |
2 files changed, 62 insertions, 3 deletions
diff --git a/tests/bugs150/pr110307/Case1.java b/tests/bugs150/pr110307/Case1.java index b0b3f8d66..880f8d188 100644 --- a/tests/bugs150/pr110307/Case1.java +++ b/tests/bugs150/pr110307/Case1.java @@ -12,13 +12,13 @@ interface AssociationSource<T> { } aspect ExtendProduct { - Link<T> AssociationSource._target = null; + Link<Q> AssociationSource<Q>._target = null; - public Link<T> AssociationSource.getTarget() { + public Link<Q> AssociationSource<Q>.getTarget() { return _target; } - public void AssociationSource.setTarget(Link<T> _target) { + public void AssociationSource<Q>.setTarget(Link<Q> _target) { this._target = _target; } diff --git a/tests/bugs150/pr110307/Case7.java b/tests/bugs150/pr110307/Case7.java new file mode 100644 index 000000000..ba8bf5af5 --- /dev/null +++ b/tests/bugs150/pr110307/Case7.java @@ -0,0 +1,59 @@ +import java.lang.annotation.*; +import java.lang.ref.*; +import java.util.*; + +public class Case7 { + + public static void main(String []argv) { + String s = "hello"; + Integer i = 35; + List l = new ArrayList(); + List<String> ls = new ArrayList<String>(); + List<Number> ln = new ArrayList<Number>(); + List<List> ll = new ArrayList<List>(); + + A a = new A(); + a.setN(ls,s); + String s2 = a.getN(ls); + System.err.println("in="+s+" out="+s2); + + B b = new B(); + b.setN(ln,i); + System.err.println("in="+i+" out="+b.getN(ln)); + + C c = new C(); + c.setN(ll,l); + List l2 = c.getN(ll); + System.err.println("in="+l+" out="+l2); + + } + +} + + +interface I<N> { + N getN(List<N> ns); + + void setN(List<N> ns,N n); +} + +aspect X { + Q I<Q>.value; + + public P I<P>.getN(List<P> ps) { + return value; + } + + public void I<Q>.setN(List<Q> ns,N n) { + this.value = n; + } + + declare parents : A implements I<String>; + declare parents : B implements I<Number>; + declare parents : C implements I<List>; +} + + +class A { } +class B { } +class C { } |