diff options
author | aclement <aclement> | 2005-11-22 16:42:09 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-11-22 16:42:09 +0000 |
commit | e549651eb81aacce53afc0268fe675fdd93051ec (patch) | |
tree | e01cd4bd431cd8b60510e8b844486136a5a6b004 | |
parent | 82b6ca01e289d309b1a38ad44fa4d552c4c6f5a8 (diff) | |
download | aspectj-e549651eb81aacce53afc0268fe675fdd93051ec.tar.gz aspectj-e549651eb81aacce53afc0268fe675fdd93051ec.zip |
117296: testcode and fixes.
4 files changed, 11 insertions, 7 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java index 92e37675b..6d7b75480 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java @@ -277,8 +277,7 @@ public class EclipseFactory { TypeVariable[] tVars = new TypeVariable[tvbs.length]; for (int i = 0; i < tvbs.length; i++) { TypeVariableBinding eclipseV = tvbs[i]; - String name = CharOperation.charToString(eclipseV.sourceName); - tVars[i] = new TypeVariable(name,fromBinding(eclipseV.superclass()),fromBindings(eclipseV.superInterfaces())); + tVars[i] = ((TypeVariableReference)fromTypeVariableBinding(eclipseV)).getTypeVariable(); } //TODO asc generics - temporary guard.... if (!(binding instanceof SourceTypeBinding)) @@ -339,6 +338,8 @@ public class EclipseFactory { UnresolvedTypeVariableReferenceType ret = new UnresolvedTypeVariableReferenceType(); typeVariableBindingsInProgress.put(aTypeVariableBinding,ret); + TypeVariable tv = new TypeVariable(name); + ret.setTypeVariable(tv); // Dont set any bounds here, you'll get in a recursive mess // TODO -- what about lower bounds?? UnresolvedType superclassType = fromBinding(aTypeVariableBinding.superclass()); @@ -346,7 +347,6 @@ public class EclipseFactory { for (int i = 0; i < superinterfaces.length; i++) { superinterfaces[i] = fromBinding(aTypeVariableBinding.superInterfaces[i]); } - TypeVariable tv = new TypeVariable(name,superclassType,superinterfaces); tv.setUpperBound(superclassType); tv.setAdditionalInterfaceBounds(superinterfaces); tv.setRank(aTypeVariableBinding.rank); @@ -357,7 +357,6 @@ public class EclipseFactory { tv.setDeclaringElementKind(TypeVariable.TYPE); // // tv.setDeclaringElement(fromBinding(aTypeVariableBinding.declaringElement)); } - ret.setTypeVariable(tv); if (aTypeVariableBinding.declaringElement instanceof MethodBinding) typeVariablesForThisMember.put(new String(aTypeVariableBinding.sourceName),ret); typeVariableBindingsInProgress.remove(aTypeVariableBinding); diff --git a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java index 14833bc63..683ee9e99 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java @@ -77,7 +77,6 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase { public void testVarargsITD_pr110906() { runTest("ITD varargs problem");} public void testBadRenderer_pr86903() { runTest("bcelrenderer bad");} - // public void testSelfBoundGenerics_pr117296() { runTest("self bounding generic types");} public void testIncompatibleClassChangeError_pr113630_1() {runTest("IncompatibleClassChangeError - errorscenario");} public void testIncompatibleClassChangeError_pr113630_2() {runTest("IncompatibleClassChangeError - workingscenario");} diff --git a/tests/src/org/aspectj/systemtest/ajc150/GenericsTests.java b/tests/src/org/aspectj/systemtest/ajc150/GenericsTests.java index 3f8475806..2af72359d 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/GenericsTests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/GenericsTests.java @@ -221,6 +221,11 @@ public class GenericsTests extends XMLBasedAjcTestCase { public void testGenericsOverrides_3() { runTest("generics and ITD overrides - 3"); } public void testGenericsOverrides_4() { runTest("generics and ITD overrides - 4"); } + + public void testSelfBoundGenerics_pr117296() { + runTest("self bounding generic types"); + } + public void testPR88606() { runTest("Parameterized types on introduced fields not correctly recognized"); } diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml index 7a19516b6..39b35bb77 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml +++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml @@ -52,9 +52,10 @@ <ajc-test dir="bugs150" pr="112756" title="pointcut expression containing 'assert'"> <compile files="Pr112756.aj" options="-warn:assertIdentifier -Xdev:Pinpoint"/> </ajc-test> - - <ajc-test dir="bugs150" pr="117296" title="self bounding generic types"> + + <ajc-test dir="bugs150/pr117296" pr="117296" title="self bounding generic types"> <compile files="PropertySupport.java" options="-1.5"/> + <run class="PropertySupport"/> </ajc-test> <ajc-test dir="bugs150" pr="113368" title="thisJoinPointStaticPart in if test"> |