]> source.dussan.org Git - aspectj.git/commitdiff
fix for Bugzilla Bug 45441
authorjhugunin <jhugunin>
Thu, 23 Oct 2003 16:47:24 +0000 (16:47 +0000)
committerjhugunin <jhugunin>
Thu, 23 Oct 2003 16:47:24 +0000 (16:47 +0000)
   IncompatibleClassChangeError at runtime when compiling with -1.4 option

org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/ThisJoinPointVisitor.java
tests/ajcTests.xml
tests/ajcTestsFailing.xml

index 2ec487518f0cb1b79be770cd6a47dcfbf257b4e0..8e5ef3837208299fa1eb0ea18eb574e2c3074391 100644 (file)
@@ -161,6 +161,14 @@ public class ThisJoinPointVisitor extends AbstractSyntaxTreeVisitorAdapter {
                //System.err.println("replace static ref: " + receiver + " is " + System.identityHashCode(receiver));
                receiver.binding = thisJoinPointStaticPartDecLocal; //thisJoinPointStaticPartDec;
                receiver.codegenBinding = thisJoinPointStaticPartDecLocal;
+               
+               ReferenceBinding thisJoinPointStaticPartType = 
+                       (ReferenceBinding)thisJoinPointStaticPartDec.type;
+                       
+               receiver.receiverType = receiver.actualReceiverType =
+                       receiver.resolvedType = thisJoinPointStaticPartType;
+                       
+               call.setActualReceiverType(thisJoinPointStaticPartType);
 
                call.binding = call.codegenBinding = getEquivalentStaticBinding(call.binding);
        }
index cd3310c0cd52f67d8327cdff17b6690e91a23355..6b7bdcf89f0ed30048595bba65c6e4bbc58bc2fa 100644 (file)
                </compile>
        </ajc-test>
 
+    <ajc-test dir="bugs/jpOptimization" 
+       pr="45441"
+       title="JoinPoint Optimization when targetting 1.4">
+        <compile 
+               files="de/test/MyMain.java,
+                          de/test/MyAspect.java"
+            options="-1.4"/>
+        <run class="de.test.MyMain"/>
+    </ajc-test>
 </suite>
index c4bfc69441ccdf71039b1177211f379075aaf2db..933125dbeb539e5e018fa8b16780f8034bd95a3b 100644 (file)
                files="Main.java"/>
         <run class="Main"/>
     </ajc-test>
-    
-    <ajc-test dir="bugs/jpOptimization" 
-       pr="45441"
-       title="JoinPoint Optimization when targetting 1.4">
-        <compile 
-               files="de/test/MyMain.java,
-                          de/test/MyAspect.java"
-            options="-1.4"/>
-        <run class="de.test.MyMain"/>
-    </ajc-test>
+
 </suite>