From: Andy Clement Date: Fri, 4 Apr 2014 19:01:18 +0000 (-0700) Subject: Fix 431541: Proceed expression not setting resolved type X-Git-Tag: V1_8_0RC3~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4ffb0fd285609fa955450964e54fc3f8fd2996ad;p=aspectj.git Fix 431541: Proceed expression not setting resolved type --- diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/Proceed.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/Proceed.java index 6e628431a..364bbe377 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/Proceed.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/Proceed.java @@ -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 index 000000000..72a1eab89 --- /dev/null +++ b/tests/bugs180/pr431541/Test.aj @@ -0,0 +1,16 @@ +public aspect Test { + + Object around(String s): call(public Object foo(String)) && args(s) { + return proceed(s); + } + +} + +class C { + public void m() { + foo("abc"); + } + public Object foo(String s) { + return s; + } +} \ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/ajc180/Ajc180Tests.java b/tests/src/org/aspectj/systemtest/ajc180/Ajc180Tests.java index dfa920e52..ea5d1c845 100644 --- a/tests/src/org/aspectj/systemtest/ajc180/Ajc180Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc180/Ajc180Tests.java @@ -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"); } diff --git a/tests/src/org/aspectj/systemtest/ajc180/ajc180.xml b/tests/src/org/aspectj/systemtest/ajc180/ajc180.xml index 8ea55c136..0d1132de6 100644 --- a/tests/src/org/aspectj/systemtest/ajc180/ajc180.xml +++ b/tests/src/org/aspectj/systemtest/ajc180/ajc180.xml @@ -2,6 +2,10 @@ + + + +