From a7483038e86dd39894d9b347f227eb6c3a33e09e Mon Sep 17 00:00:00 2001 From: Andy Clement Date: Fri, 15 Jun 2012 17:42:25 -0700 Subject: [PATCH] 382189 and 382435 --- .../src/org/aspectj/weaver/ResolvedType.java | 13 ++++---- tests/bugs170/pr382189/covbug/A.java | 2 ++ tests/bugs170/pr382189/covbug/A_ITD.aj | 12 +++++++ tests/bugs170/pr382189/covbug/B.java | 3 ++ tests/bugs170/pr382189/covbug/SuperA.java | 6 ++++ tests/bugs170/pr382189/covbug/SuperB.java | 3 ++ .../bugs170/pr382189/covbug/cc/covbug/A.class | Bin 0 -> 466 bytes .../bugs170/pr382189/covbug/cc/covbug/A.java | 10 ++++++ .../pr382189/covbug/cc/covbug/A_ITD.aj | 12 +++++++ .../bugs170/pr382189/covbug/cc/covbug/B.class | Bin 0 -> 238 bytes .../bugs170/pr382189/covbug/cc/covbug/B.java | 8 +++++ .../pr382189/covbug/cc/covbug/SuperA.class | Bin 0 -> 363 bytes .../pr382189/covbug/cc/covbug/SuperA.java | 7 ++++ .../pr382189/covbug/cc/covbug/SuperB.class | Bin 0 -> 256 bytes .../pr382189/covbug/cc/covbug/SuperB.java | 5 +++ tests/bugs170/pr382189/covbug/pj/A.class | Bin 0 -> 639 bytes tests/bugs170/pr382189/covbug/pj/B.class | Bin 0 -> 219 bytes tests/bugs170/pr382189/covbug/pj/Foo.java | 26 +++++++++++++++ tests/bugs170/pr382189/covbug/pj/SuperA.class | Bin 0 -> 325 bytes tests/bugs170/pr382189/covbug/pj/SuperB.class | Bin 0 -> 246 bytes tests/bugs170/pr382189/one/A.java | 1 + tests/bugs170/pr382189/one/A_ITD.aj | 6 ++++ tests/bugs170/pr382189/one/B.java | 1 + tests/bugs170/pr382189/one/SuperA.java | 5 +++ tests/bugs170/pr382189/one/SuperB.java | 2 ++ tests/bugs170/pr382189/three/A.java | 6 ++++ tests/bugs170/pr382189/three/A_ITD.aj | 7 ++++ tests/bugs170/pr382189/three/B.java | 2 ++ tests/bugs170/pr382189/three/SuperA.java | 5 +++ tests/bugs170/pr382189/three/SuperB.java | 2 ++ tests/bugs170/pr382189/two/A.java | 1 + tests/bugs170/pr382189/two/A_ITD.aj | 7 ++++ tests/bugs170/pr382189/two/B.java | 1 + tests/bugs170/pr382189/two/SuperA.java | 5 +++ tests/bugs170/pr382189/two/SuperB.java | 2 ++ tests/bugs170/pr382435/one/bug/A.java | 17 ++++++++++ tests/bugs170/pr382435/two/bug/A.java | 21 ++++++++++++ .../systemtest/ajc170/Ajc170Tests.java | 27 ++++++++++++++-- .../org/aspectj/systemtest/ajc170/ajc170.xml | 26 +++++++++++++++ .../aspectj/weaver/bcel/BcelTypeMunger.java | 30 ++++-------------- 40 files changed, 249 insertions(+), 32 deletions(-) create mode 100644 tests/bugs170/pr382189/covbug/A.java create mode 100644 tests/bugs170/pr382189/covbug/A_ITD.aj create mode 100644 tests/bugs170/pr382189/covbug/B.java create mode 100644 tests/bugs170/pr382189/covbug/SuperA.java create mode 100644 tests/bugs170/pr382189/covbug/SuperB.java create mode 100644 tests/bugs170/pr382189/covbug/cc/covbug/A.class create mode 100644 tests/bugs170/pr382189/covbug/cc/covbug/A.java create mode 100644 tests/bugs170/pr382189/covbug/cc/covbug/A_ITD.aj create mode 100644 tests/bugs170/pr382189/covbug/cc/covbug/B.class create mode 100644 tests/bugs170/pr382189/covbug/cc/covbug/B.java create mode 100644 tests/bugs170/pr382189/covbug/cc/covbug/SuperA.class create mode 100644 tests/bugs170/pr382189/covbug/cc/covbug/SuperA.java create mode 100644 tests/bugs170/pr382189/covbug/cc/covbug/SuperB.class create mode 100644 tests/bugs170/pr382189/covbug/cc/covbug/SuperB.java create mode 100644 tests/bugs170/pr382189/covbug/pj/A.class create mode 100644 tests/bugs170/pr382189/covbug/pj/B.class create mode 100644 tests/bugs170/pr382189/covbug/pj/Foo.java create mode 100644 tests/bugs170/pr382189/covbug/pj/SuperA.class create mode 100644 tests/bugs170/pr382189/covbug/pj/SuperB.class create mode 100644 tests/bugs170/pr382189/one/A.java create mode 100644 tests/bugs170/pr382189/one/A_ITD.aj create mode 100644 tests/bugs170/pr382189/one/B.java create mode 100644 tests/bugs170/pr382189/one/SuperA.java create mode 100644 tests/bugs170/pr382189/one/SuperB.java create mode 100644 tests/bugs170/pr382189/three/A.java create mode 100644 tests/bugs170/pr382189/three/A_ITD.aj create mode 100644 tests/bugs170/pr382189/three/B.java create mode 100644 tests/bugs170/pr382189/three/SuperA.java create mode 100644 tests/bugs170/pr382189/three/SuperB.java create mode 100644 tests/bugs170/pr382189/two/A.java create mode 100644 tests/bugs170/pr382189/two/A_ITD.aj create mode 100644 tests/bugs170/pr382189/two/B.java create mode 100644 tests/bugs170/pr382189/two/SuperA.java create mode 100644 tests/bugs170/pr382189/two/SuperB.java create mode 100644 tests/bugs170/pr382435/one/bug/A.java create mode 100644 tests/bugs170/pr382435/two/bug/A.java diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java b/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java index 0659dfc1e..a87a69871 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java @@ -2402,19 +2402,18 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl } /** - * Iff I am a parameterized type, and any of my parameters are type variable references, return a version with those type - * parameters replaced in accordance with the passed bindings. + * Iff I am a parameterized type, and any of my parameters are type variable references (or nested parameterized types), + * return a version with those type parameters replaced in accordance with the passed bindings. */ @Override public UnresolvedType parameterize(Map typeBindings) { if (!isParameterizedType()) { - return this;// throw new IllegalStateException( + // throw new IllegalStateException("Can't parameterize a type that is not a parameterized type"); + return this; } - // "Can't parameterize a type that is not a parameterized type" - // ); boolean workToDo = false; for (int i = 0; i < typeParameters.length; i++) { - if (typeParameters[i].isTypeVariableReference() || (typeParameters[i] instanceof BoundedReferenceType)) { + if (typeParameters[i].isTypeVariableReference() || (typeParameters[i] instanceof BoundedReferenceType) || typeParameters[i].isParameterizedType()) { workToDo = true; } } @@ -2434,6 +2433,8 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl BoundedReferenceType brType = (BoundedReferenceType) newTypeParams[i]; newTypeParams[i] = brType.parameterize(typeBindings); // brType.parameterize(typeBindings) + } else if (newTypeParams[i].isParameterizedType()) { + newTypeParams[i] = newTypeParams[i].parameterize(typeBindings); } } return TypeFactory.createParameterizedType(getGenericType(), newTypeParams, getWorld()); diff --git a/tests/bugs170/pr382189/covbug/A.java b/tests/bugs170/pr382189/covbug/A.java new file mode 100644 index 000000000..1bf20c5b6 --- /dev/null +++ b/tests/bugs170/pr382189/covbug/A.java @@ -0,0 +1,2 @@ +package covbug; +public class A { } diff --git a/tests/bugs170/pr382189/covbug/A_ITD.aj b/tests/bugs170/pr382189/covbug/A_ITD.aj new file mode 100644 index 000000000..5cf1a73fa --- /dev/null +++ b/tests/bugs170/pr382189/covbug/A_ITD.aj @@ -0,0 +1,12 @@ +package covbug; + + +public privileged aspect A_ITD { + declare parents: A extends SuperA; + + + public B A.getSomeB(SuperB b){ + return null; + } + +} diff --git a/tests/bugs170/pr382189/covbug/B.java b/tests/bugs170/pr382189/covbug/B.java new file mode 100644 index 000000000..1184552ef --- /dev/null +++ b/tests/bugs170/pr382189/covbug/B.java @@ -0,0 +1,3 @@ +package covbug; + +public class B extends SuperB { } diff --git a/tests/bugs170/pr382189/covbug/SuperA.java b/tests/bugs170/pr382189/covbug/SuperA.java new file mode 100644 index 000000000..288b9f9a3 --- /dev/null +++ b/tests/bugs170/pr382189/covbug/SuperA.java @@ -0,0 +1,6 @@ +package covbug; +import java.util.List; + +public abstract class SuperA { + public abstract SuperB getSomeB(SuperB b); +} diff --git a/tests/bugs170/pr382189/covbug/SuperB.java b/tests/bugs170/pr382189/covbug/SuperB.java new file mode 100644 index 000000000..8a6c2c2dd --- /dev/null +++ b/tests/bugs170/pr382189/covbug/SuperB.java @@ -0,0 +1,3 @@ +package covbug; + +public class SuperB { } diff --git a/tests/bugs170/pr382189/covbug/cc/covbug/A.class b/tests/bugs170/pr382189/covbug/cc/covbug/A.class new file mode 100644 index 0000000000000000000000000000000000000000..59a59b710f876b184e49d5cd2d74cc0424514b87 GIT binary patch literal 466 zcmZvY&q~8U5XQer)5ONq)_)g8QM|Mj8t|G@NCZ#8OT>Fpm$1@qBqV(Y1GvJW0~5OrTG+F(Z{vVqO{9|Ll+YRs?+NC0{vZgwNGfq# zEmBe3CFz`%txS}0z7Qedco5CwHZh-=Uck~ literal 0 HcmV?d00001 diff --git a/tests/bugs170/pr382189/covbug/cc/covbug/A.java b/tests/bugs170/pr382189/covbug/cc/covbug/A.java new file mode 100644 index 000000000..1c0499f94 --- /dev/null +++ b/tests/bugs170/pr382189/covbug/cc/covbug/A.java @@ -0,0 +1,10 @@ +package covbug; + + +public class A extends SuperA { + public B getSomeB(SuperB b){ + return null; + } + + +} diff --git a/tests/bugs170/pr382189/covbug/cc/covbug/A_ITD.aj b/tests/bugs170/pr382189/covbug/cc/covbug/A_ITD.aj new file mode 100644 index 000000000..5cf1a73fa --- /dev/null +++ b/tests/bugs170/pr382189/covbug/cc/covbug/A_ITD.aj @@ -0,0 +1,12 @@ +package covbug; + + +public privileged aspect A_ITD { + declare parents: A extends SuperA; + + + public B A.getSomeB(SuperB b){ + return null; + } + +} diff --git a/tests/bugs170/pr382189/covbug/cc/covbug/B.class b/tests/bugs170/pr382189/covbug/cc/covbug/B.class new file mode 100644 index 0000000000000000000000000000000000000000..91debf8f1bfc521410ca97999c7bf1ea24116489 GIT binary patch literal 238 zcmY*Ty9&ZU5S)#gnE1#SScr{UDA+0%5v+nu#Qvg3IEfcIa{iZzTWYg;Vz1IftN1K#Vx9}lOlg$Pmg^-UND6C?a;qx48_gPX0Nv}g$JJ#TEOXFibl@YXvGWDZATIy_ literal 0 HcmV?d00001 diff --git a/tests/bugs170/pr382189/covbug/cc/covbug/B.java b/tests/bugs170/pr382189/covbug/cc/covbug/B.java new file mode 100644 index 000000000..cdfd1f70b --- /dev/null +++ b/tests/bugs170/pr382189/covbug/cc/covbug/B.java @@ -0,0 +1,8 @@ +package covbug; + + +public class B extends SuperB { + + + +} diff --git a/tests/bugs170/pr382189/covbug/cc/covbug/SuperA.class b/tests/bugs170/pr382189/covbug/cc/covbug/SuperA.class new file mode 100644 index 0000000000000000000000000000000000000000..d5ba823f363d7bee68a11aaafc343fa3c2cd7aa4 GIT binary patch literal 363 zcmZXQO>2Wd5Qg6|el#X&KJJC|W^$;|V-+DOus>=)r4W9ic&PXX6L%s9;Rs!^*tRVcwzb!AH_xZ zCs7vuK0C_138Mdq;3k!>bGcLPc%$nmn}^mqh6#%>`8(u>FzY{S-oxNkw8sE{9TrEM kt2@rb*;;>q-dPYFj&=u4UIvD&U1kPGd^ { + public abstract SuperB getSomeB(SuperB b); +} diff --git a/tests/bugs170/pr382189/covbug/cc/covbug/SuperB.class b/tests/bugs170/pr382189/covbug/cc/covbug/SuperB.class new file mode 100644 index 0000000000000000000000000000000000000000..cd3b522ad5bd4fc089c14275003af00973d01f07 GIT binary patch literal 256 zcmZWjI}UMf_aA!cHwDu~cHAiIvd;WBVJnv;?V&MTilySjMcazzj znapNi@5d9s6kP{3xHj50It0sCsVWwP+HiCrn5*n43EhoKzb`5pxeH}vY o_bdi5_}{XKn?sBivwp>a`uGmIRkqD&u?!9vXz(=9gj3Dd2OxGeg8%>k literal 0 HcmV?d00001 diff --git a/tests/bugs170/pr382189/covbug/cc/covbug/SuperB.java b/tests/bugs170/pr382189/covbug/cc/covbug/SuperB.java new file mode 100644 index 000000000..2f5167d3e --- /dev/null +++ b/tests/bugs170/pr382189/covbug/cc/covbug/SuperB.java @@ -0,0 +1,5 @@ +package covbug; + +public class SuperB { + +} diff --git a/tests/bugs170/pr382189/covbug/pj/A.class b/tests/bugs170/pr382189/covbug/pj/A.class new file mode 100644 index 0000000000000000000000000000000000000000..4f315b41128c5b54dcb870595db8c5ec98ef942f GIT binary patch literal 639 zcmZuu$x6de6g@YMNn4}VPR>KsMF+4T?plOa=qjiX5yVwmA0?$pN=yX*N?j-@_yK;D zcwbtv4vV~db93$)Ufw@m-T)k6FAW_<9ZP8_D5kKC71^z(v4(XW8w9QCcusgkNR%rV z1ohaz7K8=U@x)2wc13V*cZWPl_C;v4D4W+!^iY3LT1YB-AyQ5z7IbN35Bsm$FHAphLDp8 z+vUu;c;V-mppPVI$l(g*scfg+f#`*e$_2Lh@^$_*fXWY>16${AgDY{JsXl`qxFO8) zsl~$tpKO~~C3KbF6s`*0|H7%5mvbyIZ3c^sllVg<|EV^Jz?ev+PBg? kqoiJv?d6cnv{*4aVc6t-si;+Jy!KmFvX6Ch$jADHPn2SIiU0rr literal 0 HcmV?d00001 diff --git a/tests/bugs170/pr382189/covbug/pj/B.class b/tests/bugs170/pr382189/covbug/pj/B.class new file mode 100644 index 0000000000000000000000000000000000000000..11e52e8dbd5d0949c79c4841f9c40f2d77741afd GIT binary patch literal 219 zcmX9&!3u&v5Pg%TX_h}w(6KrcbTvE}bdoMc_pKJ$ur(I#zd8jS`hY$v8f{?a&Ac~{ zna}t22Czct!$RO<;9^K{)=H}?CRo$ifnaaSvm}J6(sEZ{kJ9YLv0%o_RIWu;8}3JG zR^Oya*6Bsu#j+4OUuKn2I*;Or;AdrRPI9XnUvFEMi)Jl=jV^%_zWKLff)2mZ1aY#= e=x{e?Y?$u+33{}$%hhSgKAUP8ovHt^a_9wLf literal 0 HcmV?d00001 diff --git a/tests/bugs170/pr382189/covbug/pj/Foo.java b/tests/bugs170/pr382189/covbug/pj/Foo.java new file mode 100644 index 000000000..d8e1721b2 --- /dev/null +++ b/tests/bugs170/pr382189/covbug/pj/Foo.java @@ -0,0 +1,26 @@ +import java.util.List; + +class A extends SuperA { + public B getSomeB(SuperB b) { return null; } + public static void main(String []argv) { + A a = new A(); + System.out.println(a.getSomeB(null)); + } +} + +class B extends SuperB { +} + +abstract class SuperA { + public abstract SuperB getSomeB(SuperB b); +} + +class SuperB { } + +/* +public privileged aspect A_ITD { + declare parents: A extends SuperA; + + public B A.getSomeB(SuperB b) { return null; } +} +*/ diff --git a/tests/bugs170/pr382189/covbug/pj/SuperA.class b/tests/bugs170/pr382189/covbug/pj/SuperA.class new file mode 100644 index 0000000000000000000000000000000000000000..93153a47cf9d12c06e35a5ee5e0d02f2864e71da GIT binary patch literal 325 zcmZXPPiw+J5XIlbXf*!!+(M7hgF=r@2$+JWpofIsH@bus&6be#d-YWC;0N$SiDN_$ zbzyeiK7O;jIh_wj0Ph&tsG)CRU|~pTcq&tcPpCQLFM|20H8h8EA9eR0rM4>0JQ(ltc6Y literal 0 HcmV?d00001 diff --git a/tests/bugs170/pr382189/covbug/pj/SuperB.class b/tests/bugs170/pr382189/covbug/pj/SuperB.class new file mode 100644 index 0000000000000000000000000000000000000000..7f4c4e51bfa866bfc4ab4b497352113fb6358946 GIT binary patch literal 246 zcmX^0Z`VEs1_mPrel7-P1|D_>UUmjPMg}&U%)HDJJ4Oa(4b3n{1{UZ1lvG9rexJ;| zRKL>Pq|~C2#H1Xc2xo9+dR}5lX%UdEVH0BIla*MOsGpOVm#*)hl$DxXVr_>h#K^!E zoL^d$oa&YdGK0e{KVJ`|kB5PUffZ0J>oe3Jgp@SAqZ|5Cc^MX*M8B j7D$6cShcn@Fm41(vja&su%Hl769 { } diff --git a/tests/bugs170/pr382189/one/A_ITD.aj b/tests/bugs170/pr382189/one/A_ITD.aj new file mode 100644 index 000000000..7c5be5c9f --- /dev/null +++ b/tests/bugs170/pr382189/one/A_ITD.aj @@ -0,0 +1,6 @@ + +public privileged aspect A_ITD { + public B A.getSomeB(SuperB b){ + return null; + } +} diff --git a/tests/bugs170/pr382189/one/B.java b/tests/bugs170/pr382189/one/B.java new file mode 100644 index 000000000..b32fa4ef7 --- /dev/null +++ b/tests/bugs170/pr382189/one/B.java @@ -0,0 +1 @@ +public class B extends SuperB { } diff --git a/tests/bugs170/pr382189/one/SuperA.java b/tests/bugs170/pr382189/one/SuperA.java new file mode 100644 index 000000000..09755a197 --- /dev/null +++ b/tests/bugs170/pr382189/one/SuperA.java @@ -0,0 +1,5 @@ +import java.util.List; + +public abstract class SuperA { + public abstract SuperB getSomeB(SuperB b); +} diff --git a/tests/bugs170/pr382189/one/SuperB.java b/tests/bugs170/pr382189/one/SuperB.java new file mode 100644 index 000000000..a5098aa84 --- /dev/null +++ b/tests/bugs170/pr382189/one/SuperB.java @@ -0,0 +1,2 @@ + +public class SuperB { } diff --git a/tests/bugs170/pr382189/three/A.java b/tests/bugs170/pr382189/three/A.java new file mode 100644 index 000000000..c24a6f65d --- /dev/null +++ b/tests/bugs170/pr382189/three/A.java @@ -0,0 +1,6 @@ +public class A { + public static void main(String []argv) { + A a = new A(); + System.out.println(a.getSomeB(null)); + } +} diff --git a/tests/bugs170/pr382189/three/A_ITD.aj b/tests/bugs170/pr382189/three/A_ITD.aj new file mode 100644 index 000000000..39b55978f --- /dev/null +++ b/tests/bugs170/pr382189/three/A_ITD.aj @@ -0,0 +1,7 @@ + +public privileged aspect A_ITD { + declare parents: A extends SuperA; + public B A.getSomeB(SuperB b){ + return null; + } +} diff --git a/tests/bugs170/pr382189/three/B.java b/tests/bugs170/pr382189/three/B.java new file mode 100644 index 000000000..db22693a2 --- /dev/null +++ b/tests/bugs170/pr382189/three/B.java @@ -0,0 +1,2 @@ +public class B extends SuperB { +} diff --git a/tests/bugs170/pr382189/three/SuperA.java b/tests/bugs170/pr382189/three/SuperA.java new file mode 100644 index 000000000..09755a197 --- /dev/null +++ b/tests/bugs170/pr382189/three/SuperA.java @@ -0,0 +1,5 @@ +import java.util.List; + +public abstract class SuperA { + public abstract SuperB getSomeB(SuperB b); +} diff --git a/tests/bugs170/pr382189/three/SuperB.java b/tests/bugs170/pr382189/three/SuperB.java new file mode 100644 index 000000000..a5098aa84 --- /dev/null +++ b/tests/bugs170/pr382189/three/SuperB.java @@ -0,0 +1,2 @@ + +public class SuperB { } diff --git a/tests/bugs170/pr382189/two/A.java b/tests/bugs170/pr382189/two/A.java new file mode 100644 index 000000000..9f4b93d84 --- /dev/null +++ b/tests/bugs170/pr382189/two/A.java @@ -0,0 +1 @@ +public class A {} diff --git a/tests/bugs170/pr382189/two/A_ITD.aj b/tests/bugs170/pr382189/two/A_ITD.aj new file mode 100644 index 000000000..39b55978f --- /dev/null +++ b/tests/bugs170/pr382189/two/A_ITD.aj @@ -0,0 +1,7 @@ + +public privileged aspect A_ITD { + declare parents: A extends SuperA; + public B A.getSomeB(SuperB b){ + return null; + } +} diff --git a/tests/bugs170/pr382189/two/B.java b/tests/bugs170/pr382189/two/B.java new file mode 100644 index 000000000..b32fa4ef7 --- /dev/null +++ b/tests/bugs170/pr382189/two/B.java @@ -0,0 +1 @@ +public class B extends SuperB { } diff --git a/tests/bugs170/pr382189/two/SuperA.java b/tests/bugs170/pr382189/two/SuperA.java new file mode 100644 index 000000000..09755a197 --- /dev/null +++ b/tests/bugs170/pr382189/two/SuperA.java @@ -0,0 +1,5 @@ +import java.util.List; + +public abstract class SuperA { + public abstract SuperB getSomeB(SuperB b); +} diff --git a/tests/bugs170/pr382189/two/SuperB.java b/tests/bugs170/pr382189/two/SuperB.java new file mode 100644 index 000000000..a5098aa84 --- /dev/null +++ b/tests/bugs170/pr382189/two/SuperB.java @@ -0,0 +1,2 @@ + +public class SuperB { } diff --git a/tests/bugs170/pr382435/one/bug/A.java b/tests/bugs170/pr382435/one/bug/A.java new file mode 100644 index 000000000..a331bcc47 --- /dev/null +++ b/tests/bugs170/pr382435/one/bug/A.java @@ -0,0 +1,17 @@ +package bug; + +import java.util.List; + +public class A {}//extends B { } + +abstract class B { + public abstract List> getList(); +} + +privileged aspect A_ITD { + declare parents: A extends B; + + public List> A.getList(){ + return null; + } +} diff --git a/tests/bugs170/pr382435/two/bug/A.java b/tests/bugs170/pr382435/two/bug/A.java new file mode 100644 index 000000000..f4d08be5c --- /dev/null +++ b/tests/bugs170/pr382435/two/bug/A.java @@ -0,0 +1,21 @@ +package bug; + +import java.util.List; + +public class A { + public static void main(String[] argv) { + new A().getList(); + } +}//extends B { } + +abstract class B { + public abstract List> getList(); +} + +privileged aspect A_ITD { + declare parents: A extends B; + + public List> A.getList(){ + return null; + } +} diff --git a/tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java b/tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java index 3585e782a..c9b1a7377 100644 --- a/tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java @@ -39,6 +39,30 @@ public class Ajc170Tests extends org.aspectj.testing.XMLBasedAjcTestCase { // runTest("missing annos on priv aspects - 2"); // } + public void testCovariantGenerics382435_1() { + runTest("covariant generic itds 1"); + } + + public void testCovariantGenerics382435_2() { + runTest("covariant generic itds 2"); + } + + public void testCovariantGenericsItd382189_1() { + runTest("covariant generics 1"); + } + + public void testCovariantGenericsItd382189_2() { + runTest("covariant generics 2"); + } + + public void testCovariantGenericsItd382189_3() { + runTest("covariant generics 3"); + } + + public void testCovariantGenericsItd382189() { + runTest("covariant generics"); + } + public void testGenericAspectAround382723() { runTest("generic aspect"); } @@ -55,9 +79,6 @@ public class Ajc170Tests extends org.aspectj.testing.XMLBasedAjcTestCase { runTest("generic aspect 4"); } -// public void testCovariantGenericsItd382189() { -// runTest("covariant generics"); -// } public void testAttributeErrorJ7() { runTest("attribute issue with J7"); diff --git a/tests/src/org/aspectj/systemtest/ajc170/ajc170.xml b/tests/src/org/aspectj/systemtest/ajc170/ajc170.xml index 05ebd0ee2..1413eae39 100644 --- a/tests/src/org/aspectj/systemtest/ajc170/ajc170.xml +++ b/tests/src/org/aspectj/systemtest/ajc170/ajc170.xml @@ -27,6 +27,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +