]> source.dussan.org Git - aspectj.git/commitdiff
Progress on: Bug 126316: Invalid method signature: Pjava/lang/Enum<Ljava/lang/Object;>;
authoracolyer <acolyer>
Fri, 3 Feb 2006 11:00:46 +0000 (11:00 +0000)
committeracolyer <acolyer>
Fri, 3 Feb 2006 11:00:46 +0000 (11:00 +0000)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=126316

  --> fix and test case

tests/src/org/aspectj/systemtest/ajc151/Ajc151Tests.java
tests/src/org/aspectj/systemtest/ajc151/ajc151.xml
weaver/src/org/aspectj/weaver/BoundedReferenceType.java
weaver/src/org/aspectj/weaver/ReferenceType.java
weaver/src/org/aspectj/weaver/TypeVariableReferenceType.java
weaver/src/org/aspectj/weaver/World.java

index d47e36d8f6977a971f2a7e7fb6b945e103d6eb73..c2080edb965a59be63cb0e0ba6be4bbce03fb847 100644 (file)
@@ -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
index 7d5a966c2b8dd09f2c7fb5b791165c00cc184677..5898a17a4a414ef02b40057b2dac584688721d6a 100644 (file)
         </compile>
     </ajc-test>
 
+    <ajc-test dir="bugs151" title="E extends Enum(E) again">
+        <compile files="Pr126316.aj" options="-1.5"/>
+    </ajc-test>
     
     <!-- New features down here... when they arent big enough to have their own test file -->
     
index 28d2e80d92c2e582bf0d5085848775a93b4565f3..2d0016d631c7377fbafbefc51009e02c83f90bb6 100644 (file)
@@ -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()));
        }
index 1e6648f7d286b169fcc45ca2be5feaf64d3935b7..82d640476ad86ace7fdc75672c73a77c941f7b65 100644 (file)
@@ -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.
index b12bb7262c1ba761214b380e760f5a7a9d73186d..e35ff5c862c6a171a330329288f72b8804e0f0e8 100644 (file)
@@ -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;
index c470a0ec65e7a6cd5f19c02c939082bf96839264..03ff28c3b9a9bcfa32bd68dccc6d1e2d34587db8 100644 (file)
@@ -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;
         }