From: acolyer Date: Fri, 3 Feb 2006 11:00:46 +0000 (+0000) Subject: Progress on: Bug 126316: Invalid method signature: Pjava/lang/Enum; X-Git-Tag: POST_MEMORY_CHANGES~114 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f856b9d877b394ff0b8b9920b18f36aae26ad23b;p=aspectj.git Progress on: Bug 126316: Invalid method signature: Pjava/lang/Enum; https://bugs.eclipse.org/bugs/show_bug.cgi?id=126316 --> fix and test case --- diff --git a/tests/src/org/aspectj/systemtest/ajc151/Ajc151Tests.java b/tests/src/org/aspectj/systemtest/ajc151/Ajc151Tests.java index d47e36d8f..c2080edb9 100644 --- a/tests/src/org/aspectj/systemtest/ajc151/Ajc151Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc151/Ajc151Tests.java @@ -70,6 +70,10 @@ public class Ajc151Tests extends org.aspectj.testing.XMLBasedAjcTestCase { // the argument is org.aspectj.lang.JoinPoint, check that this is added assertFalse("printParameters method should have arguments",pe2.getParameterTypes().isEmpty()); } + + public void testParameterizedEnum_pr126316() { + runTest("E extends Enum(E) again"); + } /* * @AspectJ bugs and enhancements diff --git a/tests/src/org/aspectj/systemtest/ajc151/ajc151.xml b/tests/src/org/aspectj/systemtest/ajc151/ajc151.xml index 7d5a966c2..5898a17a4 100644 --- a/tests/src/org/aspectj/systemtest/ajc151/ajc151.xml +++ b/tests/src/org/aspectj/systemtest/ajc151/ajc151.xml @@ -138,6 +138,9 @@ + + + diff --git a/weaver/src/org/aspectj/weaver/BoundedReferenceType.java b/weaver/src/org/aspectj/weaver/BoundedReferenceType.java index 28d2e80d9..2d0016d63 100644 --- a/weaver/src/org/aspectj/weaver/BoundedReferenceType.java +++ b/weaver/src/org/aspectj/weaver/BoundedReferenceType.java @@ -57,8 +57,8 @@ public class BoundedReferenceType extends ReferenceType { /** * only for use when resolving GenericsWildcardTypeX or a TypeVariableReferenceType */ - protected BoundedReferenceType(String sig, World world) { - super(sig,world); + protected BoundedReferenceType(String sig, String sigErasure, World world) { + super(sig, sigErasure, world); setUpperBound(world.resolve(UnresolvedType.OBJECT)); setDelegate(new ReferenceTypeReferenceTypeDelegate((ReferenceType)getUpperBound())); } diff --git a/weaver/src/org/aspectj/weaver/ReferenceType.java b/weaver/src/org/aspectj/weaver/ReferenceType.java index 1e6648f7d..82d640476 100644 --- a/weaver/src/org/aspectj/weaver/ReferenceType.java +++ b/weaver/src/org/aspectj/weaver/ReferenceType.java @@ -70,6 +70,10 @@ public class ReferenceType extends ResolvedType { public ReferenceType(String signature, World world) { super(signature, world); } + + public ReferenceType(String signature, String signatureErasure, World world) { + super(signature,signatureErasure, world); + } /** * Constructor used when creating a parameterized type. diff --git a/weaver/src/org/aspectj/weaver/TypeVariableReferenceType.java b/weaver/src/org/aspectj/weaver/TypeVariableReferenceType.java index b12bb7262..e35ff5c86 100644 --- a/weaver/src/org/aspectj/weaver/TypeVariableReferenceType.java +++ b/weaver/src/org/aspectj/weaver/TypeVariableReferenceType.java @@ -31,7 +31,9 @@ public class TypeVariableReferenceType extends BoundedReferenceType implements T public TypeVariableReferenceType( TypeVariable aTypeVariable, World aWorld) { - super(aTypeVariable.getFirstBound().getSignature(),aWorld); + super(aTypeVariable.getFirstBound().getSignature(), + aTypeVariable.getFirstBound().getErasureSignature(), + aWorld); this.typeVariable = aTypeVariable; this.isExtends = false; this.isSuper = false; diff --git a/weaver/src/org/aspectj/weaver/World.java b/weaver/src/org/aspectj/weaver/World.java index c470a0ec6..03ff28c3b 100644 --- a/weaver/src/org/aspectj/weaver/World.java +++ b/weaver/src/org/aspectj/weaver/World.java @@ -209,7 +209,7 @@ public abstract class World implements Dump.INode { // might be a problem here, not sure '?' should make it to here as a signature, the // proper signature for wildcard '?' is '*' // fault in generic wildcard, can't be done earlier because of init issues - ResolvedType something = new BoundedReferenceType("?",this); + ResolvedType something = new BoundedReferenceType("?","Ljava/lang/Object",this); typeMap.put("?",something); return something; }