diff options
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/ThisJoinPointVisitor.java | 8 | ||||
-rw-r--r-- | tests/ajcTests.xml | 9 | ||||
-rw-r--r-- | tests/ajcTestsFailing.xml | 11 |
3 files changed, 18 insertions, 10 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/ThisJoinPointVisitor.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/ThisJoinPointVisitor.java index 2ec487518..8e5ef3837 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/ThisJoinPointVisitor.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/ThisJoinPointVisitor.java @@ -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); } diff --git a/tests/ajcTests.xml b/tests/ajcTests.xml index cd3310c0c..6b7bdcf89 100644 --- a/tests/ajcTests.xml +++ b/tests/ajcTests.xml @@ -6775,4 +6775,13 @@ </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> diff --git a/tests/ajcTestsFailing.xml b/tests/ajcTestsFailing.xml index c4bfc6944..933125dbe 100644 --- a/tests/ajcTestsFailing.xml +++ b/tests/ajcTestsFailing.xml @@ -136,14 +136,5 @@ 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> |