]> source.dussan.org Git - aspectj.git/commitdiff
Fix 431541: Proceed expression not setting resolved type
authorAndy Clement <aclement@gopivotal.com>
Fri, 4 Apr 2014 19:01:18 +0000 (12:01 -0700)
committerAndy Clement <aclement@gopivotal.com>
Fri, 4 Apr 2014 19:01:18 +0000 (12:01 -0700)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/Proceed.java
tests/bugs180/pr431541/Test.aj [new file with mode: 0755]
tests/src/org/aspectj/systemtest/ajc180/Ajc180Tests.java
tests/src/org/aspectj/systemtest/ajc180/ajc180.xml

index 6e628431a7335be627d2a887d925ab0a9126df5c..364bbe3774cc672e70a040e0fe94e077d38b0acc 100644 (file)
@@ -1,6 +1,6 @@
 /* *******************************************************************
- * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
- *               2004 contributors
+ * Copyright (c) 2002-2014 Palo Alto Research Center, Incorporated (PARC) 
+ *               and Contributors
  * All rights reserved. 
  * This program and the accompanying materials are made available 
  * under the terms of the Eclipse Public License v1.0 
@@ -169,7 +169,8 @@ public class Proceed extends MessageSend {
                }
                checkInvocationArguments(scope,null,this.actualReceiverType,binding,
                                this.arguments,binding.parameters,argsContainCast,this);
-               
+
+               this.resolvedType = binding.returnType;
                return binding.returnType;
        }
 
diff --git a/tests/bugs180/pr431541/Test.aj b/tests/bugs180/pr431541/Test.aj
new file mode 100755 (executable)
index 0000000..72a1eab
--- /dev/null
@@ -0,0 +1,16 @@
+public aspect Test {\r
+\r
+       Object around(String s): call(public Object foo(String)) && args(s) {\r
+               return proceed(s);\r
+       }\r
+\r
+}\r
+\r
+class C {\r
+  public void m() {\r
+    foo("abc");\r
+  }\r
+  public Object foo(String s) {\r
+    return s;\r
+  }\r
+}
\ No newline at end of file
index dfa920e524d02acebc83dbacbbc49aceaf4dfde1..ea5d1c84555a92ba1727b51eaedc41a62bddd652 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2013 Contributors
+ * Copyright (c) 2013-2014 Contributors
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,6 +21,10 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
  */
 public class Ajc180Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
        
+       public void testNullAnnotationMatching_431541() {
+               runTest("NullAnnotationMatching exception");
+       }
+       
        public void testAnnosWith18Flags_415957() {
                runTest("annotations with 1.8 flags");
        }
index 8ea55c136c6342695174182a68366d38b2548819..0d1132de601dc9e365613583b872cf752c9bbba3 100644 (file)
@@ -2,6 +2,10 @@
 
 <suite>
 
+       <ajc-test dir="bugs180/pr431541" title="NullAnnotationMatching exception">
+               <compile options="-1.8" files="Test.aj"/>
+       </ajc-test>
+       
        <ajc-test dir="bugs180/415957" title="annotations with 1.8 flags">
                <compile files="MyAspect.aj MyClass.java" options="-1.8 -showWeaveInfo">
                        <message kind="weave" text="Join point 'method-execution(void MyClass.method())' in Type 'MyClass' (MyClass.java:3) advised by before advice from 'MyAspect' (MyAspect.aj:5)"/>